1import{j as e,r as m,b as h}from"./vendor-react-core-_0sZDOLQ.js";import{b as u}from"./index-j07E1qHv.js";import{C as g,a as f}from"./card-DHmBnTdH.js";import{B as o}from"./badge-BXqwvh8U.js";import{m as c}from"./vendor-framer-motion-C1oRD-X5.js";import{h as p,Z as x,aN as b}from"./vendor-lucide-Ddz0eB7N.js";import{D as j,F as v}from"./vendor-utils-BRu4i-LD.js";import{T as N,a as y,b as n}from"./tabs-BUF6w8PE.js";import{S as w}from"./skeleton-ClHfYp06.js";import"./vendor-radix-CFmJ1img.js";import"./vendor-supabase-Ca6cp8v2.js";function S({jogo:a,index:r=0}){const l=t=>({agendado:"bg-blue-100 text-blue-800 border-blue-200",ao_vivo:"bg-green-100 text-green-800 border-green-200",finalizado:"bg-gray-100 text-gray-800 border-gray-200"})[t],i=t=>({agendado:"Agendado",ao_vivo:"Ao Vivo",finalizado:"Finalizado"})[t],s=t=>({masculino:"Seleção Principal",feminino:"Seleção Feminina",sub23:"Sub-23",sub20:"Sub-20",sub17:"Sub-17"})[t]||t;return e.jsx(c.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:r*.1,duration:.5},children:e.jsx(g,{className:"overflow-hidden hover:shadow-lg transition-shadow duration-300",children:e.jsxs(f,{className:"p-6",children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsx(o,{variant:"outline",className:"bg-red-50 text-red-700 border-red-200 font-semibold",children:s(a.tipo)}),e.jsx(o,{variant:"outline",className:`${l(a.status)} border font-medium`,children:i(a.status)})]}),e.jsxs("div",{className:"flex items-center justify-center gap-6 mb-6",children:[e.jsxs("div",{className:"flex-1 text-center",children:[e.jsx("div",{className:"w-20 h-20 mx-auto mb-3 gradient-red rounded-full flex items-center justify-center shadow-lg",children:e.jsx("span",{className:"text-white font-bold text-2xl",children:"ANG"})}),e.jsx("h3",{className:"font-bold text-xl text-gray-900",children:"Angola"}),a.status==="finalizado"&&a.resultado_angola!==void 0&&e.jsx("p",{className:"text-4xl font-bold text-red-600 mt-2",children:a.resultado_angola})]}),e.jsx("div",{className:"flex-shrink-0",children:a.status==="finalizado"?e.jsx("span",{className:"text-2xl font-bold text-gray-400",children:"-"}):e.jsx("span",{className:"text-2xl font-bold text-gray-900",children:"VS"})}),e.jsxs("div",{className:"flex-1 text-center",children:[e.jsx("div",{className:"w-20 h-20 mx-auto mb-3 bg-gray-200 rounded-full flex items-center justify-center shadow-lg",children:e.jsx("span",{className:"text-gray-700 font-bold text-lg",children:a.adversario.substring(0,3).toUpperCase()})}),e.jsx("h3",{className:"font-bold text-xl text-gray-900",children:a.adversario}),a.status==="finalizado"&&a.resultado_adversario!==void 0&&e.jsx("p",{className:"text-4xl font-bold text-gray-600 mt-2",children:a.resultado_adversario})]})]}),e.jsxs("div",{className:"space-y-2 text-sm text-gray-600",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(p,{className:"w-4 h-4 text-red-600"}),e.jsx("span",{className:"font-medium",children:a.competicao})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(x,{className:"w-4 h-4 text-red-600"}),e.jsx("span",{children:j(new Date(a.data_hora),"dd 'de' MMMM, yyyy 'à s' HH:mm",{locale:v})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(b,{className:"w-4 h-4 text-red-600"}),e.jsx("span",{children:a.local})]})]})]})})})}function P(){const[a,r]=m.useState("agendado"),{data:l=[],isLoading:i}=h({queryKey:["jogos",a],queryFn:async()=>{const s=a==="finalizado"?"-data_hora":"data_hora";return await u.entities.Jogo.filter({status:a},s,50)}});return e.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs(c.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[e.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[e.jsx(x,{className:"w-8 h-8 text-red-600"}),e.jsx("h1",{className:"text-5xl font-bold text-gray-900",children:"Calendário de Jogos"})]}),e.jsx("p",{className:"text-xl text-gray-600",children:"Acompanhe todos os jogos das seleções angolanas"})]}),e.jsx("div",{className:"flex justify-center mb-12",children:e.jsx(N,{value:a,onValueChange:r,children:e.jsxs(y,{className:"bg-white shadow-sm p-1",children:[e.jsx(n,{value:"agendado",children:"Próximos Jogos"}),e.jsx(n,{value:"ao_vivo",children:"Ao Vivo"}),e.jsx(n,{value:"finalizado",children:"Resultados"})]})})}),i?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:[1,2,3,4,5,6].map(s=>e.jsx(w,{className:"h-80 rounded-xl"},s))}):l.length>0?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:l.map((s,t)=>e.jsx(S,{jogo:s,index:t},s.id))}):e.jsx("div",{className:"text-center py-20",children:e.jsxs("p",{className:"text-gray-500 text-lg",children:[a==="agendado"&&"Nenhum jogo agendado no momento",a==="ao_vivo"&&"Nenhum jogo ao vivo no momento",a==="finalizado"&&"Nenhum resultado disponÃvel"]})})]})})}export{P 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.