import{f as v,Q as B,g as S,c as e,o as t,a as j,w as G,d as g,j as d,F as y,k as u,n as c,t as l,q as h,u as H}from"./B4plKoGL.js";import{z as I,A as O}from"./B8nX8PFk.js";import T from"./CJB0ATus.js";import{s as V}from"./lGy7RumW.js";const w={class:"s-glossary"},C={class:"my-0 mx-auto grid columns-1 gap-2 py-4 px-2"},D={key:2,class:"s-text-paragraph"},P={key:0},N={key:3,class:"s-text-paragraph"},_={key:0},$={key:0},q={key:1},z={key:0},F={key:2},E={key:0},W={key:4,class:"s-text-paragraph"},A={key:0},L={key:5,class:"s-text-paragraph"},M={key:0,class:"box-border inline-block w-full px-4 py-1"},R={class:"s-text-paragraph"},U=["href"],J="s-glossary",K=v({__name:"SGlossary",props:{...I(),theme:{type:String,default:"light-theme"},game:{type:Object,required:!0},gameInfo:{type:Object,required:!0},headerText:{type:String,default:"Glossary"},grids:{type:String,default:"4"},historyPath:{type:String,default:""},opponentTeam:{type:String,default:""}},setup(a){B(r=>({"5de00320":a.grids}));const m=a,{themeClasses:x}=O(m,J),k=S(()=>{const r={},o=Object.keys(m.gameInfo);return Object.values(m.gameInfo).forEach((s,n)=>{m.game[s]&&m.game[s]!="0"&&(m.game[s].length>0||Object.keys(m.game[s]).length>0)&&(o!=null&&o[n])&&(r[o[n]]=s)}),r}),b=r=>Object.entries(m.game[r]).filter(o=>o[1]!=="0"),f=r=>r=="Home Plate"?"HP":r=="First"?"1B":r=="Second"?"2B":"3B";return(r,o)=>(t(),e("div",w,[j(T,{theme:a.theme,size:"regular",headerText:a.headerText,class:c(["w-full",[H(x)]]),topBorderRadius:!0,expandedIcon:"icon-minus",contractIcon:"icon-plus"},{default:G(()=>[g("div",C,[(t(!0),e(y,null,u(k.value,(s,n)=>(t(),e("div",{key:n,class:"box-border inline-block w-full px-4 py-1"},[n=="DateWithDoubleHeader"?(t(),e("span",{key:0,class:c(["s-text-paragraph-bold",[a.theme==="light-theme"?"text-theme-brand-light":"text-theme-brand-dark"]])},"Date: ",2)):(t(),e("span",{key:1,class:c(["s-text-paragraph-bold",[a.theme==="light-theme"?"text-theme-brand-light":"text-theme-brand-dark"]])},l(n)+": ",3)),n=="Umpires"?(t(),e("span",D,[(t(!0),e(y,null,u(b(s),(p,i)=>(t(),e("span",{key:i},[g("label",null,[h(l(`${f(p[0])}: ${p[1]}`),1),i+1!=b(s).length?(t(),e("span",P,", ")):d("",!0)])]))),128))])):n=="Officials"?(t(),e("span",N,[(t(!0),e(y,null,u(a.game[s],(p,i)=>(t(),e("span",{key:i},[p.title?(t(),e("label",_,[h(l(p.title)+": "+l(p.name),1),i+1!=a.game[s].length?(t(),e("span",$,", ")):d("",!0)])):p.name?(t(),e("label",q,[h(l(p.name)+" ",1),i+1!=a.game[s].length?(t(),e("span",z,", ")):d("",!0)])):(t(),e("label",F,[h(l(p),1),i+1!=a.game[s].length?(t(),e("span",E,", ")):d("",!0)]))]))),128))])):n=="DateWithDoubleHeader"?(t(),e("span",W,[h(l(a.game[s])+" ",1),a.game.doubleHeaderGame!="0"?(t(),e("span",A," (Game "+l(a.game.doubleHeaderGame)+")",1)):d("",!0)])):(t(),e("span",L,l(a.game[s]),1))]))),128)),a.historyPath?(t(),e("div",M,[g("span",{class:c(["s-text-paragraph-bold",[a.theme==="light-theme"?"text-theme-brand-light":"text-theme-brand-dark"]])},"View: ",2),g("span",R,[g("a",{class:"text-theme-link-light s-text-paragraph-small-bold !underline",href:a.historyPath},l(`Match History vs ${a.opponentTeam}`),9,U)])])):d("",!0)])]),_:1},8,["theme","headerText","class"])]))}}),ee=V(K,[["__scopeId","data-v-851b426a"]]);export{ee as default};