module.exports=[18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},42602,(a,b,c)=>{"use strict";b.exports=a.r(18622)},87924,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactJsxRuntime},72131,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].React},35112,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactDOM},40777,a=>{"use strict";var b=a.i(87924),c=a.i(72131);a.i(97361);var d=a.i(58426),e=a.i(49251),f=a.i(32008),g=a.i(74908),h=a.i(19470),i=a.i(19987);function j(){let[a,j]=(0,c.useState)([]),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)("");async function o(){try{let a=await fetch("https://localhost:7275/api/teams"),b=await a.json();b.length>0?j(b):(l(!0),n("Network connection error - data is missing for all Teams. Please confirm API is running and port 7275 is unblocked, then try again."))}catch(a){console.error("Error fetching teams: ",a),l(!0),n(a)}}return(0,c.useEffect)(()=>{o()},[]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.NavBar,{}),(0,b.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 p-8",style:{overflow:"auto",marginTop:50},children:[k?(0,b.jsx)("div",{className:"flex content-center",children:(0,b.jsx)(g.Card,{sx:{maxWidth:345},children:(0,b.jsx)(i.default,{className:"bg-red-100",children:(0,b.jsxs)(h.Typography,{children:[(0,b.jsx)("b",{children:"ERROR:"})," ",m]})})})}):(0,b.jsx)(b.Fragment,{}),(0,b.jsx)("div",{className:"max-w-6xl mx-auto",children:(0,b.jsxs)("div",{className:"bg-white rounded-lg shadow-lg p-6 mb-6",children:[(0,b.jsx)("h1",{className:"text-4xl",children:"All Teams:"}),(0,b.jsx)(f.default,{children:(0,b.jsxs)("table",{className:"w-full",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"border-b-2 border-gray-200",children:[(0,b.jsx)("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Name:"}),(0,b.jsx)("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"City:"}),(0,b.jsx)("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"League:"})]})}),(0,b.jsx)("tbody",{children:a.map((a,c)=>(0,b.jsxs)("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[(0,b.jsx)("td",{className:"py-3 px-4",children:(0,b.jsxs)("a",{href:`./teams/${a.teamid}`,className:"text-[#0000ee]",children:[a.name," ",(0,b.jsxs)("b",{children:["[",a.abbr,"]"]})]})}),(0,b.jsx)("td",{className:"py-3 px-4 font-medium",children:a.city?a.city:"-"}),(0,b.jsxs)("td",{className:"py-3 px-4 text-gray-600",children:[1==a.leagueid?"American":"National"," League"]})]},c))})]})})]})})]}),(0,b.jsx)(e.Footer,{})]})}a.s(["default",()=>j])}];

//# sourceMappingURL=%5Broot-of-the-server%5D__93390e01._.js.map