import{_ as c,y as t,H as r,R as d,o as a,c as s,b as _,w as p,t as v,T as i}from"./index.js";const w={class:"countdown"},m={__name:"Countdown",props:{openParams:Array},setup(l){const o=l,e=t(o.openParams?o.openParams[0]:3),n=t(null),u=()=>{window.closeInterface("Countdown"),sendClientEvent(gm.EVENT_EXECUTE_PUBLIC,"OnCountdownClose")};return r(()=>{n.value=setInterval(()=>{e.value>1?(window.playSound("countdown/sfx_count.mp3"),e.value--):(window.playSound("countdown/sfx_start.mp3"),clearInterval(n.value),n.value=null,u())},1e3)}),d(()=>{n.value&&(clearInterval(n.value),n.value=null)}),(f,C)=>(a(),s("div",w,[_(i,{name:"count"},{default:p(()=>[(a(),s("div",{class:"countdown-number",key:e.value},v(e.value),1))]),_:1})]))}},x=c(m,[["__scopeId","data-v-2674f8eb"]]);export{x as default};
