import{o as i,c as a,a as e,n as C,d as l,t as _,_ as y,r as m,b as d,e as p,f as b,w as g,F as I,i as N}from"./index.js";import{S}from"./ScrollableContainer.js";import{_ as w,a as x,b as k}from"./close5.js";import"./dom.js";const O=["innerHTML"];function L(r,o,s,h,n,c){return i(),a("div",{class:"player-card",style:l({backgroundColor:s.bg})},[e("div",{class:C(["player-card__icon",[`player-card__icon--${s.iconId}`]]),style:l({opacity:s.iconOpacity})},null,6),e("div",{class:"player-card__number",style:l({color:s.fontColor})},_(s.playerNumber),5),e("div",{class:"player-card__nickname",style:l({color:s.fontColor}),innerHTML:s.playerName.replace("_","<br>")},null,12,O)],4)}const B={props:{bg:{default:"#feb900"},fontColor:{default:"#35121f"},iconOpacity:{default:.1},iconId:{default:1},playerNumber:{default:7},playerName:{default:"Ivanov_Ivan"}}},M=y(B,[["render",L]]),F={class:"iface-centered"},P={class:"card-selection"},T=e("div",{class:"card-selection__title",style:{color:"rgba(255, 255, 255, .6)"}},[p("Выберите карточку своего персонажа и ваш командный"),e("br"),p("номер, нажав на стрелочку для просмотра миниатюры")],-1),V={class:"card-selection__cards"},z={class:"icon-selector"},E=e("img",{src:w},null,-1),H=[E],j={class:"card-container"},D={class:"final-player-card"},Z={class:"number-selector"},q=["width","height"],A=e("path",{d:"M20.7457 3.32851C20.3552 2.93798 19.722 2.93798 19.3315 3.32851L12.0371 10.6229L4.74275 3.32851C4.35223 2.93798 3.71906 2.93798 3.32854 3.32851C2.93801 3.71903 2.93801 4.3522 3.32854 4.74272L10.6229 12.0371L3.32856 19.3314C2.93803 19.722 2.93803 20.3551 3.32856 20.7457C3.71908 21.1362 4.35225 21.1362 4.74277 20.7457L12.0371 13.4513L19.3315 20.7457C19.722 21.1362 20.3552 21.1362 20.7457 20.7457C21.1362 20.3551 21.1362 19.722 20.7457 19.3315L13.4513 12.0371L20.7457 4.74272C21.1362 4.3522 21.1362 3.71903 20.7457 3.32851Z",fill:"#feb900"},null,-1),G=[A],J=["width","height"],K=e("path",{d:"M7 10L12 15L17 10",stroke:"#feb900","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Q=[K],R={class:"numbers"},U=["onClick","onMouseover"],W={class:"card-selection__buttons"},X=e("img",{src:x},null,-1),Y=[X],$=e("img",{src:k},null,-1),ee=[$];function ne(r,o,s,h,n,c){const u=m("player-card"),v=m("ScrollableContainer");return i(),a("div",F,[e("div",P,[T,e("div",V,[e("div",z,[e("button",{class:"icon-changer",onClick:o[0]||(o[0]=(...t)=>c.changeIconId&&c.changeIconId(...t))},H),e("div",j,[d(u,{iconId:n.iconId,bg:"#35121f",iconOpacity:"1",playerName:"",playerNumber:""},null,8,["iconId"])])]),e("div",D,[d(u,{iconId:n.iconId,playerName:n.playerName,playerNumber:n.playerNumber},null,8,["iconId","playerName","playerNumber"])]),e("div",Z,[p(_(n.playerNumber),1),n.numberSelectorOpened?(i(),a("svg",{key:0,class:"cross",onClick:o[1]||(o[1]=t=>n.numberSelectorOpened=!n.numberSelectorOpened),width:n.numberSelectorOpened?"15px":"20px",height:n.numberSelectorOpened?"15px":"20px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},G,8,q)):b("",!0),n.numberSelectorOpened?b("",!0):(i(),a("svg",{key:1,class:"arrow",onClick:o[2]||(o[2]=t=>n.numberSelectorOpened=!n.numberSelectorOpened),width:n.numberSelectorOpened?"15px":"20px",height:n.numberSelectorOpened?"15px":"20px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Q,8,J)),d(v,{class:"numbers-wrap",style:l({display:n.numberSelectorOpened?"block":"none"}),type:2},{default:g(()=>[e("div",R,[(i(),a(I,null,N(99,t=>e("span",{key:t,style:l({color:n.playerNumber==t?"#feb900":"rgba(255, 255, 255, .3)"}),onClick:f=>{n.playerNumber=t,n.numberSelectorOpened=!1},onMouseover:f=>n.playerNumber=t},_(t),45,U)),64))])]),_:1},8,["style"])])]),e("div",W,[e("button",{class:"card-selection__button",onClick:o[3]||(o[3]=t=>c.confirm())},Y),e("button",{class:"card-selection__button",onClick:o[4]||(o[4]=t=>c.close())},ee)])])])}const oe={props:["openParams"],components:{PlayerCard:M,ScrollableContainer:S},data(){return{iconId:1,playerName:"Ivan_Fedorov",playerNumber:1,numberSelectorOpened:!1}},created(){const r=this.openParams||["Test_Player",1,1];this.playerName=r[0],this.playerNumber=r[1]||1,this.iconId=r[2]||1},methods:{close(){window.closeInterface("FootballCardSelection")},confirm(){const r=this.playerNumber,o=this.iconId;sendClientEvent(0,"FB_ClientInviteTeam",0,parseInt(r),parseInt(o))},changeIconId(){this.iconId>=15?this.iconId=1:this.iconId++}}},ce=y(oe,[["render",ne]]);export{ce as default};
