import{D as p}from"./DanceInfo.js";import{o as c,c as o,a as s,n as h,F as u,i as D,d as _,e as i,t as l,f as L,p as f,g as m,_ as k}from"./index.js";const r=e=>(f("data-v-619d0ef0"),e=e(),m(),e),E={class:"dance-school"},b={class:"background"},C=r(()=>s("div",{class:"dancing-list-title"},"ТАНЦЫ И ЭМОЦИИ",-1)),I={class:"background-action"},w=["onClick"],P={class:"dancing-list-box"},S={class:"dancing-list-text-info"},x=r(()=>s("span",{class:"dancing-list-text-category"},[i("ТАНЕЦ"),s("br")],-1)),y={class:"dancing-list-text-name"},T=r(()=>s("br",null,null,-1)),N={class:"dancing-list-text-progress"},V={class:"dancing-container-background"},X={key:0,class:"dancing-container-info"},A=r(()=>s("div",{class:"dancing-container-info-title"},[i("Вы хотите приступить к изучению этого "),s("br"),i("танцевального движения?")],-1)),B={class:"dancing-container-info-level"},U={class:"dancing-container-info-price"};function F(e,n,v,Y,d,t){return c(),o("div",E,[s("div",b,[C,s("div",{class:h(["dancing-close",{"hover-disable":d.hoverDisable}]),onClick:n[0]||(n[0]=g=>t.clickDancingList(255))},"X",2),s("div",I,[(c(!0),o(u,null,D(this.list,(g,a)=>(c(),o("div",{class:h(["dancing-list-container",{"hover-disable":d.hoverDisable}]),onClick:z=>t.clickDancingList(a)},[s("div",{class:"dancing-list-box-progress-bar",style:_(t.getDancingProgressStyle(a))},null,4),s("div",P,[s("div",{class:"dancing-list-box-image",style:_({backgroundImage:`url(${t.getDancingIcon(a)})`})},null,4)]),s("div",S,[x,s("span",y,[i(l(t.getDancingName(a)),1),T]),s("span",N,[i("Изучение: "),s("span",null,l(t.getDancingProgress(a))+"%",1)])])],10,w))),256))]),s("div",V,[d.showed.state==1?(c(),o("div",X,[s("div",{class:"dancing-container-info-close",onClick:n[1]||(n[1]=g=>t.clickDancingInfo())},"X"),A,s("div",B,[i("Сложность изучения:"),s("span",null,l(t.getDancingTrackLevel(this.showed.index))+" из 10",1)]),s("div",U,[i("Стоимость урока:"),s("span",null,l(t.getDancingLessonPrice(this.showed.index))+" руб",1)]),s("div",{class:"dancing-container-info-start",onClick:n[2]||(n[2]=g=>t.clickDancingStartLesson())},"НАЧАТЬ")])):L("",!0)])])])}const M={name:"dance-list",props:["openParams"],data(){return{MAX_STYLE_LEVEL:1e3,lessonPrice:1e3,hoverDisable:!1,showed:{state:0,index:0},list:[]}},created(){this.$data.noAdaptation=!0,this.openParams&&(this.list=this.openParams)},methods:{getDancingList(e,n){this.list=JSON.parse(e)},clickDancingStartLesson(){sendClientEvent(gm.EVENT_EXECUTE_PUBLIC,"ClickPlayerDancingList",this.showed.index)},clickDancingList(e){if(e==255){if(this.showed.state==1)return 0;this.showed.state=0,this.hoverDisable=!1,sendClientEvent(gm.EVENT_EXECUTE_PUBLIC,"ClickPlayerDancingList",255)}else this.showed.state==0&&(this.showed.state=1,this.showed.index=e,this.hoverDisable=!0)},clickDancingInfo(){this.showed.state==1&&(this.showed.state=0,this.showed.index=0,this.hoverDisable=!1)},getDancingName(e){return p[e].name},getDancingProgressStyle(e){let n=this.list[e][0]/this.MAX_STYLE_LEVEL*100;return"clip-path: circle("+11.6/100*n+"vh at 1% 1%)"},getDancingIcon(e){return"/images/dancingIcons/"+(e+1)+".png"},getDancingProgress(e){return parseInt(this.list[e][0]/this.MAX_STYLE_LEVEL*100)},getDancingTrackLevel(e){return parseInt(this.list[e][0]<100?1:this.list[e][0]/100)},getDancingLessonPrice(e){return this.list[e][1]}}},j=k(M,[["render",F],["__scopeId","data-v-619d0ef0"]]);export{j as default};
