import{w as r}from"./dom.js";import{o as c,c as l,a as d,d as p,_ as u}from"./index.js";const h={class:"overlay-container"};function y(i,s,o,e,t,a){return c(),l("div",h,[d("div",{class:"overlay",style:p(`background: ${t.color}; transition: opacity ${t.transition}ms ease; opacity: ${t.opacity}`)},null,4)])}const m={props:["openParams"],data(){return{transition:1e3,opacity:0,opacityHideTransition:0,color:""}},created(){if(this.$data.noAdaptation=!0,this.isUnmounted=!1,this.closeTimeout=null,this.openParams){const[i,s,o,e]=this.openParams;e&&window.setCursorStatus("Overlay",!1),window.setDrawLabelStatus(!1),i<=0&&(this.transition=0,this.opacity=o)}},mounted(){r(()=>{if(!this.isUnmounted&&this.openParams){const[i,s,o,e,t,a,n]=this.openParams;this.transition=i,this.opacity=o,t&&(this.opacityHideTransition=t),a&&(this.color=a),n&&n.length&&window.playSound(n),setTimeout(()=>{this.transition=this.opacityHideTransition,this.opacity=0,this.closeTimeout=setTimeout(()=>closeInterface("Overlay"),this.transition)},this.transition+s)}})},unmounted(){window.setDrawLabelStatus(!0),this.isUnmounted=!0,this.closeTimeout&&clearTimeout(this.closeTimeout)},methods:{}},w=u(m,[["render",y],["__scopeId","data-v-edb5f0c4"]]);export{w as default};
