import{C as u}from"./ContaineredButton.js";import{M as C}from"./ModalMobileButtons.js";import{o as E}from"./menu3.js";import{r as m,o as a,c as r,a as l,t as b,f,b as _,h as w,n as M,_ as h}from"./index.js";import"./Button.js";import"./telegram-authenticator.js";import"./close2.js";import"./donate.js";import"./money.js";import"./ButtonContainer.js";/* empty css                                                               */import"./Button3.js";/* empty css                                                      */import"./colors.js";const y={class:"battle-pass-welcome__container"},B=l("div",{class:"battle-pass-welcome__prize"},null,-1),k=l("div",{class:"battle-pass-welcome__background"},null,-1),P=l("div",{class:"battle-pass-welcome__logo"},null,-1),x={key:0,class:"battle-pass-welcome__text"},v={key:1,class:"battle-pass-welcome__buttons"};function T(n,o,s,i,t,e){const c=m("ControlsContaineredButton"),d=m("ModalMobileButtons");return a(),r("div",{class:M(["battle-pass-welcome iface-container",{"battle-pass-welcome_mobile":e.isMobile}])},[l("div",y,[B,k,P,t.text?(a(),r("div",x,b(t.text),1)):f("",!0),e.isMobile?(a(),w(d,{key:2,class:"battle-pass-welcome__mobile-buttons",cancelText:"понятно",confirmText:"к пропуску",onConfirm:e.toMenu,onCancel:e.close},null,8,["onConfirm","onCancel"])):(a(),r("div",v,[_(c,{containerText:"К Пропуску",onPressed:o[0]||(o[0]=p=>e.playClickSound(()=>e.toMenu())),text:"Enter",keyCode:t.KEY_CODE_ENTER},null,8,["keyCode"]),_(c,{containerText:"Закрыть",onPressed:o[1]||(o[1]=p=>e.playClickSound(()=>e.close())),keyCode:t.KEY_CODE_ESC},null,8,["keyCode"])]))])],2)}const S={props:["openParams"],components:{ControlsContaineredButton:u,ModalMobileButtons:C},data(){return{KEY_CODE_ENTER:window.KEY_CODE_ENTER,KEY_CODE_ESC:window.KEY_CODE_ESC,discount:null,timeLeft:null,text:"Боевой пропуск предлагает уникальные награды и задания, которые позволят вам погрузиться в атмосферу сражений."}},computed:{isMobile(){return this.$root.isMobile}},created(){this.$data.noAdaptation=!0,this.openParams&&(this.text=this.openParams[0],this.discount=this.openParams[1],this.timeLeft=this.openParams[2])},methods:{formatTime(n){const s=new Date(n).getTime();if(s>=864e5)return"> 24 часов";if(s<=0)return"end";if(s<6e4)return"< минуты";const i=Math.floor(Math.abs(s)/1e3),t=Math.floor(i/60),e=Math.floor(t/60);return`${String(e).padStart(2,"0")}:${String(t%60).padStart(2,"0")}`},toMenu(){E("battlepass"),window.closeInterface("BattlePassWelcome")},playClickSound(n){window.playSound("battle_pass/click1.mp3"),n()},actionModal(){sendClientEvent(gm.EVENT_EXECUTE_PUBLIC,"BPd_OnPlayerBuyPremium")},close(){window.closeInterface("BattlePassWelcome")}}},X=h(S,[["render",T]]);export{X as default};
