import{H as g}from"./Heading.js";import{C as h}from"./Close.js";import{r as m,o as r,c as _,b as v,a as e,w as P,e as f,t,f as b,F as w,i as A,n as k,p as R,g as C,_ as y}from"./index.js";import"./telegram-authenticator.js";import"./close2.js";import"./Button.js";import"./donate.js";import"./money.js";const x=a=>(R("data-v-8290727e"),a=a(),C(),a),j={class:"rating-container iface-container"},I=x(()=>e("div",{class:"rating__before"},null,-1)),N={class:"rating-wrapper"},S={class:"rating-table"},H={key:0,class:"rating-table__row-head rating-table__row"},V={class:"rating-table__row-cells"},B={class:"rating-table__col yellow"},M={class:"rating-table__col"},T={class:"rating-table__col yellow"},z={class:"rating-table__container"},F={class:"rating-table__row-cells"},D={class:"rating-table__col"},E={class:"rating-table__col"},J={class:"rating-table__col"};function L(a,o,i,d,n,s){const p=m("controls-close"),u=m("Heading");return r(),_("div",j,[v(p,{onClose:o[0]||(o[0]=l=>s.close())}),e("div",{class:k(["rating",{rating_mobile:s.isMobile}])},[I,e("div",N,[v(u,{class:"rating-heading",size:32},{default:P(()=>[f(t(n.content.title),1)]),_:1}),e("div",S,[s.topRow?(r(),_("div",H,[e("div",V,[e("div",B,t(s.topRow.id),1),e("div",M,t(s.topRow.name.replace("_"," ")),1)]),e("div",T,t(s.topRow.value)+" "+t(n.content.value),1)])):b("",!0),e("div",z,[(r(!0),_(w,null,A(n.rating.filter((l,c)=>c!=n.top),(l,c)=>(r(),_("div",{class:"rating-table__row",key:c},[e("div",F,[e("div",D,t(l.id),1),e("div",E,t(l.name.replace("_"," ")),1)]),e("div",J,t(l.value)+" "+t(n.content.value),1)]))),128))])])])],2)])}const O={props:["openParams"],components:{Heading:g,ControlsClose:h},data(){return{content:{title:"Топ игроков",value:"очков"},top:0,rating:[{id:1,name:"Pavel_Addams",value:10},{id:1,name:"Pavel_Addams",value:8},{id:1,name:"Pavel_Addamsdsjkgdkkdsgdsgsdjkghjkdshgkjsdj",value:81e4},{id:1,name:"Pavel_Addams",value:8},{id:1,name:"Pavel_Addams",value:8},{id:1,name:"Pavel_Addams",value:8},{id:1,name:"Pavel_Addams",value:8},{id:1,name:"Pavel_Addams",value:8},{id:1,name:"Pavel_Addams",value:8},{id:1,name:"Pavel_Addams",value:8},{id:1,name:"Pavel_Addams",value:8},{id:1,name:"Pavel_Addams",value:8},{id:1,name:"Pavel_Addams",value:8},{id:1,name:"Pavel_Addams",value:8},{id:1,name:"Pavel_Addams",value:8}]}},computed:{topRow(){return this.rating.filter((o,i)=>i==this.top)[0]||!1},isMobile(){return this.$root.isMobile}},created(){this.$data.noAdaptation=!0,this.openParams&&(this.content={title:this.openParams[0],value:this.openParams[1]},this.setTop(this.openParams[2]),this.loadRating(this.openParams[3],!1))},methods:{setTop(a){this.top=a},loadRating(a,o=!0){o&&(a=JSON.parse(a));const i=[];for(const d of a)i.push({id:d[0],name:d[1],value:d[2]});this.rating=i},close(){window.closeInterface("Rating")}}},Z=y(O,[["render",L],["__scopeId","data-v-8290727e"]]);export{Z as default};
