"use strict";(globalThis["webpackChunkradmir_interfaces"]=globalThis["webpackChunkradmir_interfaces"]||[]).push([[1596],{825832:(t,e,r)=>{r.r(e),r.d(e,{default:()=>_});var a=r(373396),i=r(87139);const s=r.p+"assets/src/assets/images/gang-timer/icon.png",l={class:"gang-timer__content"},n=(0,a._)("img",{class:"gang-timer__icon",src:s},null,-1),o={class:"gang-timer__timer"},m=["innerHTML"];function g(t,e,r,s,g,h){return(0,a.wg)(),(0,a.iD)("div",{class:(0,i.C_)(["gang-timer",{"gang-timer_mobile":h.isMobile}])},[(0,a._)("div",l,[n,(0,a._)("div",o,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(h.formatedTimer[0],((t,e)=>((0,a.wg)(),(0,a.iD)("div",{class:"gang-timer__timer-char",key:e},(0,i.zw)(t),1)))),128)),(0,a.Uk)(":"),((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(h.formatedTimer[1],((t,e)=>((0,a.wg)(),(0,a.iD)("div",{class:"gang-timer__timer-char",key:e},(0,i.zw)(t),1)))),128))]),(0,a._)("div",{class:"gang-timer__label",style:(0,i.j5)({color:g.labelColor})},(0,i.zw)(g.label),5),(0,a._)("div",{class:"gang-timer__text",innerHTML:g.text},null,8,m)])],2)}const h={props:["openParams"],data(){return{label:"Radmir Gang",labelColor:"#65C466",text:"Проводит захват особняка",timer:3e4,timerInterval:null}},created(){this.$data.noAdaptation=!0,this.openParams&&(this.setLabel(this.openParams[0]),this.setLabelColor(this.openParams[1]),this.setText(this.openParams[2]),this.setTimer(1e3*this.openParams[3]-Date.now())),this.startTimer()},computed:{formatedTimer(){const t=this.timer/1e3,e=Math.floor(t/60).toString().padStart(2,"0"),r=Math.floor(t%60).toString().padStart(2,"0");return[Array.from(e),Array.from(r)]},isMobile(){return this.$root.isMobile}},methods:{setLabel(t){this.label=t},setLabelColor(t){this.labelColor=t},setText(t){this.text=t},setTimer(t){this.timer=t},startTimer(){clearInterval(this.timerInterval),this.timerInterval=setInterval((()=>{if(this.timer<=0)return clearInterval(this.timerInterval);this.timer-=1e3}),1e3)}}};var c=r(940089);const d=(0,c.Z)(h,[["render",g]]),_=d}}]);