(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,27010,e=>{"use strict";var s=e.i(43476),a=e.i(71645),t=e.i(52989),r=e.i(2930);e.i(23842);var l=e.i(45832),i=e.i(94884),n=e.i(13607),c=e.i(66796),d=e.i(99011);function o({params:e}){let[o,h]=(0,a.useState)([]),{id:m}=(0,a.use)(e),[x,p]=(0,a.useState)(!1),[j,u]=(0,a.useState)("");async function b(){try{let e=await fetch(`https://localhost:7275/api/teams/${m}`),s=await e.json();s.length>0?h(s):(p(!0),u("Invalid Team ID - please try another team from dropdown menu."))}catch(e){console.error("Error fetching team roster: ",e),p(!0),u(e)}}return(0,a.useEffect)(()=>{b()},[m]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.NavBar,{}),(0,s.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 p-8",style:{marginTop:50},children:(0,s.jsxs)("div",{className:"max-w-6xl mx-auto",children:[x?(0,s.jsx)("div",{className:"flex content-center",children:(0,s.jsx)(n.Card,{sx:{maxWidth:345},children:(0,s.jsx)(d.default,{className:"bg-red-100",children:(0,s.jsxs)(c.Typography,{children:[(0,s.jsx)("b",{children:"ERROR:"})," ",j]})})})}):(0,s.jsx)(s.Fragment,{}),(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow-lg p-6 mb-6",children:[(0,s.jsxs)("h1",{className:"text-4xl",children:[r.teamsMap[parseInt(m)]," Team Roster:"]}),(0,s.jsxs)("table",{className:"w-full",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"border-b-2 border-gray-200",children:[(0,s.jsx)("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Name:"}),(0,s.jsx)("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Position:"})]})}),(0,s.jsx)("tbody",{children:o.map((e,a)=>{var r,l,i;return(0,s.jsxs)("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[(0,s.jsxs)("td",{className:"py-3 px-4",children:["[",e.number,"] ",(0,s.jsx)("a",{href:`/player/${e.playerid}`,className:"text-[#0000ee]",children:(r=e.firstname,l=e.usesname,i=e.lastname,`${r} ${r===l?"":`"${l}" `}${i}`)})]}),(0,s.jsx)("td",{className:"py-3 px-4",children:t.positionMap[e.position]})]},a)})})]})]})]})}),(0,s.jsx)(i.Footer,{})]})}e.s(["default",()=>o])}]);