import{o as s,c as n,b as o,w as r,d as c,e as u,t as l,f as m,T as d,n as h,a as _,_ as p}from"./index.js";const w=_("div",{class:"training-hint__border"},null,-1);function T(t,e,a,x,b,i){return s(),n("div",{class:h(["training-hint iface-container",{"training-hint_mobile":i.isMobile,"training-hint_mobile-square":i.isSquareMobile}])},[o(d,{name:"slide-right",appear:""},{default:r(()=>[t.isActive?(s(),n("div",{key:0,class:"training-hint__content",style:c(i.style)},[w,u(l(t.text),1)],4)):m("",!0)]),_:1})],2)}const f=500,g={props:["openParams"],data:()=>({noAdaptation:!0,isActive:!0,text:"В этом обновлении мы наваливали боком на BMW. В этом обновлении мы наваливали боком на BMW. В этом обновлении мы наваливали",duration:5e3,timeout:null}),computed:{isMobile(){return this.$root.isMobile},isSquareMobile(){return this.$root.isSquareMobile},style(){const a=window.innerWidth/window.innerHeight/(1.75/100);return{...this.isSquareMobile&&{transform:`scale(${a/100})`}}}},async created(){if(this.openParams){const[t,e]=this.openParams;this.setText(t),this.setDuration(e)}await this.startTimeout()},unmounted(){this.timeout&&clearTimeout(this.timeout)},methods:{setText(t){this.text=t},setDuration(t){this.duration=t},waitForDuration(){return new Promise(t=>this.timeout=setTimeout(t,this.duration))},waitForAnimation(){return new Promise(t=>this.timeout=setTimeout(t,f))},async startTimeout(){await this.waitForDuration(),this.isActive=!1,await this.waitForAnimation(),this.close()},close(){window.closeInterface("TrainingHint")}}},y=p(g,[["render",T]]);export{y as default};
