"use strict";(globalThis["webpackChunkradmir_interfaces"]=globalThis["webpackChunkradmir_interfaces"]||[]).push([[2455],{133499:(t,e,a)=>{a.r(e),a.d(e,{default:()=>k});var o=a(373396),n=a(87139),s=a(436950),l=a(434672);const i=(0,o._)("img",{class:"battle-pass-welcome__logo",src:s},null,-1),r={class:"battle-pass-welcome__content"},c={key:0,class:"battle-pass-welcome__text"},u={class:"battle-pass-welcome__buttons"},d={key:0,class:"b-button__discount"},m=(0,o._)("img",{src:l},null,-1);function p(t,e,a,s,l,p){const _=(0,o.up)("BaseButton"),w=(0,o.up)("Modal");return(0,o.wg)(),(0,o.iD)("div",{class:(0,n.C_)(["battle-pass-welcome iface-container",{"battle-pass-welcome_mobile":p.isMobile}])},[i,(0,o._)("div",r,[l.text?((0,o.wg)(),(0,o.iD)("div",c,(0,n.zw)(l.text),1)):(0,o.kq)("",!0),(0,o._)("div",u,[(0,o.Wm)(_,{onClick:e[0]||(e[0]=t=>p.playClickSound((()=>p.buy()))),onMouseenter:p.playHoverSound},{default:(0,o.w5)((()=>[(0,o.Uk)("КУПИТЬ УЛУЧШЕННЫЙ ПРОПУСК"),l.discount&&l.timeLeft?((0,o.wg)(),(0,o.iD)("div",d,[(0,o.Uk)("-"+(0,n.zw)(l.discount)+"%",1),m,(0,o._)("span",null,(0,n.zw)(p.formatTime(l.timeLeft))+" осталось",1)])):(0,o.kq)("",!0)])),_:1},8,["onMouseenter"]),(0,o.Wm)(_,{onClick:e[1]||(e[1]=t=>p.playClickSound((()=>p.toMenu()))),onMouseenter:p.playHoverSound,type:1},{default:(0,o.w5)((()=>[(0,o.Uk)("Подробнее")])),_:1},8,["onMouseenter"])])]),l.isShowModal?((0,o.wg)(),(0,o.j4)(w,{key:0,data:p.modalData,onAction:p.actionModal,onCancel:p.cancelModal},null,8,["data","onAction","onCancel"])):(0,o.kq)("",!0)],2)}var _=a(661435),w=a(626613),h=a(457618);const M={props:["openParams"],components:{BaseButton:_.Y,Modal:w.Z},data(){return{discount:null,timeLeft:null,text:"",isShowModal:!1}},computed:{isMobile(){return this.$root.isMobile},modalData(){return{...h.z[h.f.BUY],title:"Купить улучшенный пропуск",value:0}}},created(){this.$data.noAdaptation=!0,this.openParams&&(this.text=this.openParams[0],this.discount=this.openParams[1],this.timeLeft=this.openParams[2])},methods:{formatTime(t){const e=864e5,a=new Date(t).getTime();if(a>=e)return"> 24 часов";if(a<=0)return"end";if(a<6e4)return"< минуты";const o=Math.floor(Math.abs(a)/1e3),n=Math.floor(o/60),s=Math.floor(n/60);return`${String(s).padStart(2,"0")}:${String(n%60).padStart(2,"0")}`},buy(){this.isShowModal=!0},toMenu(){sendClientEvent(gm.EVENT_EXECUTE_PUBLIC,"BattlePass_OnClickWelcomeMenu"),window.closeInterface("BattlePassWelcome")},playHoverSound(){window.playSound("sounds/battle_pass/hover.mp3")},playClickSound(t){window.playSound("sounds/battle_pass/click1.mp3"),t()},actionModal(){sendClientEvent(gm.EVENT_EXECUTE_PUBLIC,"BattlePass_OnPlayerBuyPremium")},cancelModal(){this.isShowModal=!1}}};var b=a(940089);const f=(0,b.Z)(M,[["render",p]]),k=f}}]);