import{w as n}from"./dom.js";import{_ as a}from"./time3.js";import{o as r,c as m,a as t,t as e,_}from"./index.js";const l={class:"information-timer"},c={class:"information-timer__label"},h={class:"information-timer__container"},d=t("img",{class:"information-timer__icon",src:a},null,-1),u={class:"information-timer__time"};function f(v,R,w,I,s,o){return r(),m("div",l,[t("div",c,e(s.label),1),t("div",h,[d,t("div",u,e(o.getTimeFormat()),1)])])}const p=0,S=1,i=2,E={props:["openParams"],data(){return{time:null,label:null,isShowHours:!1}},created(){this.interval=null,this.isUnmounted=!1},mounted(){this.$data.noAdaptation=!0,this.label=this.openParams[p],this.time=this.openParams[S],this.openParams[i]&&(this.isShowHours=this.openParams[i]),this.$nextTick(()=>{n(()=>{this.isUnmounted||(this.interval=setInterval(()=>{this.time>0?this.time-=1:window.closeInterface("InformationTimer")},1e3))})})},unmounted(){this.isUnmounted=!0,this.interval&&clearInterval(this.interval)},methods:{getTimeFormat(){return window.getTimeFormatSeconds(this.time,!this.isShowHours)}}},O=_(E,[["render",f]]);export{O as default};
