import{_ as r,a as d,b as l}from"./background-3.js";import{o,c,a as s,d as _,t as n,_ as g}from"./index.js";const u={class:"loading-screen iface-container"},h={class:"loading-screen__text"},m={class:"loading-screen__title"},p={class:"loading-screen__description"};function v(a,t,e,f,b,i){return o(),c("div",u,[s("div",{class:"loading-screen__image",style:_(i.slideStyle)},null,4),s("div",h,[s("div",m,n(i.slide.title),1),s("div",p,n(i.slide.text),1)])])}const S={name:"LoadingScreen",props:["openParams"],data(){return{screens:Object.assign({"/src/assets/images/loading-screen/background-1.jpg":r,"/src/assets/images/loading-screen/background-2.jpg":d,"/src/assets/images/loading-screen/background-3.jpg":l}),slides:[{image:"background-1.jpg",title:"Организации",text:"Все об организациях вы можете увидеть на портале игры"},{image:"background-2.jpg",title:"Банды",text:"Все о бандах вы можете увидеть на портале игры"},{image:"background-3.jpg",title:"Госки",text:"Все о госках вы можете увидеть на портале игры"}],currentSlide:0,delay:1e4}},computed:{slide(){return this.slides[this.currentSlide]},slideAnimation(){return`fade ${this.delay}ms linear infinite`},slideBackground(){return`url('${this.screens[`/src/assets/images/loading-screen/${this.slide.image}`]}')`},slideStyle(){return{animation:this.slideAnimation,backgroundImage:this.slideBackground}}},created(){this.$data.noAdaptation=!0,this.openParams&&(this.delay=this.openParams[0],this.loadSlides(this.openParams[1])),this.slideInterval=setInterval(()=>this.nextSlide(),this.delay)},beforeUnmount(){clearInterval(this.slideInterval)},methods:{loadSlides(a){const t=[];for(const e of a)t.push({image:e[0],title:e[1],text:e[2]});this.slides=t},nextSlide(){this.currentSlide+1<this.slides.length?this.currentSlide++:this.currentSlide=0}}},k=g(S,[["render",v],["__scopeId","data-v-3f115714"]]);export{k as default};
