1import{Q as N,b,r as k,w as L,t as T,j as C,z as w,B as l,C as i,D as d,E as q,F as u,G as g,H as f,J as h,I as E}from"./index-DVR3Q7fa.js";import{S as j}from"./SdpSquadCard-D-K6EBFL.js";import{S as B}from"./SdpDropdown-8zfh-Yya.js";import I from"./MessageSection-CMUfcvMZ.js";const O={name:"SquadList",components:{SquadCard:j,SdpDropDown:B,MessageSection:I,SyHeading:N},props:{playerList:{type:Object,default:()=>{}},isLoading:{type:Boolean,default:!1}},setup(s){const{t:r}=b(),c=[{name:r("teams_page.complete_squad"),value:"complete_squad"}],a=k({name:r("teams_page.complete_squad"),value:"complete_squad"}),p=e=>{a.value=e},_=()=>{var e;(e=s==null?void 0:s.playerList)==null||e.forEach(t=>{const o={name:t.position,value:t.position};c.push(o)})},m=C(()=>{var e;return(e=s==null?void 0:s.playerList)==null?void 0:e.map(t=>({position:t.position,players:t.players.sort((o,n)=>Number(o.jerseyNumber)-Number(n.jerseyNumber)||o.lastName.localeCompare(n.lastName)||o.firstName.localeCompare(n.firstName))}))});return L(()=>s.playerList,e=>{e&&_()}),{squadTypes:c,selectedSquadType:a,selectSquadType:p,players:m,isEmpty:T}}},V={key:0,class:"squad-container"},x={class:"squad-filter"},D={key:0},F={class:"section-title-container"};function H(s,r,c,a,p,_){const m=l("sdp-drop-down"),e=l("sy-heading"),t=l("squad-card"),o=l("message-section");return a.isEmpty(c.playerList)?c.isLoading?h("",!0):(i(),E(o,{key:1,message:s.$t("teams_page.squad_no_content")},null,8,["message"])):(i(),d("div",V,[q("div",x,[u(m,{options:a.squadTypes,selected:a.selectedSquadType,onUpdateOption:a.selectSquadType},null,8,["options","selected","onUpdateOption"])]),(i(!0),d(g,null,f(a.players,(n,S)=>(i(),d("div",{key:S},[a.selectedSquadType.value==="complete_squad"||n.position===a.selectedSquadType.value?(i(),d("div",D,[q("div",F,[u(e,{primary:"","heading-label":n.position,heading:"heading 3","is-section-heading":!0,uppercase:""},null,8,["heading-label"])]),(i(!0),d(g,null,f(n.players,(y,v)=>(i(),d("div",{key:v,class:"player-cards inline-block"},[u(t,{"player-details":y,"player-position":y.realPosition},null,8,["player-details","player-position"])]))),128))])):h("",!0)]))),128))]))}const M=w(O,[["render",H],["__scopeId","data-v-78db0f11"]]);export{M as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.