1import{r as c,b as y,j as e}from"./vendor-react-core-_0sZDOLQ.js";import{B as r,b as w}from"./index-j07E1qHv.js";import{C as I,a as C}from"./card-DHmBnTdH.js";import{I as A}from"./input-rti45mgP.js";import{S as D}from"./skeleton-ClHfYp06.js";import{B as m}from"./badge-BXqwvh8U.js";import{h as F}from"./vendor-utils-BRu4i-LD.js";import{m as x}from"./vendor-framer-motion-C1oRD-X5.js";import{n as o,a2 as k,aZ as L,as as M,a_ as Z,a$ as _,aa as u}from"./vendor-lucide-Ddz0eB7N.js";import"./vendor-radix-CFmJ1img.js";import"./vendor-supabase-Ca6cp8v2.js";const h=[{id:"regulamento-competicoes-ancaf-2024",title:"Regulamento de Competições da ANCAF",category:"Regulamentos",file_url:"/documentos/regulamento-competicoes-ancaf.pdf",publish_date:"2024-03-14",version:"Ratificado em 2024",issuer:"Associação Nacional de Clubes Angolanos de Futebol"}];function O(){const[l,f]=c.useState(""),[a,p]=c.useState("Todos"),{data:g=[],isLoading:b}=y({queryKey:["documents"],queryFn:()=>w.entities.Document.list("-publish_date",100)}),j=new Set(h.map(s=>s.id)),i=[...h,...g.filter(s=>!j.has(s.id))],N=["Todos","Estatutos","Regulamentos","Comunicados","Formulários"],n=i.filter(s=>{var d;const t=(d=s.title)==null?void 0:d.toLowerCase().includes(l.toLowerCase()),v=a==="Todos"||s.category===a;return t&&v});return e.jsxs("main",{className:"min-h-screen bg-gray-50",children:[e.jsxs("section",{className:"bg-gradient-to-br from-faf-blue via-faf-blue-light to-faf-blue-dark py-20 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0zNiAxOGMtMy4zMTQgMC02IDIuNjg2LTYgNnMyLjY4NiA2IDYgNiA2LTIuNjg2IDYtNi0yLjY4Ni02LTYtNiIgZmlsbD0iI2ZmZiIgZmlsbC1vcGFjaXR5PSIuMSIvPjwvZz48L3N2Zz4=')] opacity-20"}),e.jsx("div",{className:"container mx-auto px-4 relative",children:e.jsxs(x.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-3 bg-white/20 backdrop-blur-xl px-6 py-3 rounded-2xl mb-6 border border-white/30 shadow-lg shadow-black/10",children:[e.jsx(o,{className:"w-5 h-5 text-white"}),e.jsx("span",{className:"text-white font-semibold",children:"Base de Dados Legal"})]}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-white mb-4",children:"Documentos Oficiais"}),e.jsx("p",{className:"text-white/90 max-w-2xl mx-auto mb-6",children:"Aceda a todos os regulamentos, estatutos, formulários e comunicados oficiais da Federação Angolana de Futebol de forma simples e rápida."})]})})]}),e.jsx("section",{className:"py-12",children:e.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-4 justify-between items-center mb-10 bg-white p-4 rounded-2xl shadow-sm border border-gray-100",children:[e.jsx("div",{className:"flex gap-2 w-full md:w-auto overflow-x-auto pb-2 md:pb-0",children:N.map(s=>e.jsx(r,{variant:a===s?"default":"outline",onClick:()=>p(s),className:`rounded-full transition-all ${a===s?"bg-red-600 text-white shadow-md shadow-red-500/30":"text-gray-600"}`,children:s},s))}),e.jsxs("div",{className:"relative w-full md:w-80",children:[e.jsx(k,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),e.jsx(A,{placeholder:"Pesquisar documento...",value:l,onChange:s=>f(s.target.value),className:"pl-10 rounded-full border-gray-200 focus:border-red-500"})]})]}),b&&i.length===0?e.jsx("div",{className:"space-y-4",children:[1,2,3,4,5].map(s=>e.jsx(D,{className:"h-24 w-full rounded-2xl"},s))}):n.length>0?e.jsx("div",{className:"space-y-4",children:n.map((s,t)=>e.jsx(x.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:t*.05},children:e.jsxs(I,{className:"hover:border-red-500 hover:shadow-lg transition-all group overflow-hidden relative",children:[e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1.5 bg-gradient-to-b from-red-600 to-yellow-500 opacity-0 group-hover:opacity-100 transition-opacity"}),e.jsxs(C,{className:"p-6 flex flex-col md:flex-row md:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-red-50 text-red-600 rounded-xl flex items-center justify-center flex-shrink-0 group-hover:bg-red-600 group-hover:text-white transition-colors",children:s.category==="Estatutos"?e.jsx(L,{className:"w-6 h-6"}):s.category==="Comunicados"?e.jsx(M,{className:"w-6 h-6"}):s.category==="Formulários"?e.jsx(Z,{className:"w-6 h-6"}):e.jsx(o,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsxs("h3",{className:"font-bold text-lg text-gray-900 group-hover:text-red-600 transition-colors mb-1 flex items-center gap-2",children:[s.title,s.version&&e.jsx(m,{variant:"secondary",className:"text-[10px] bg-slate-100 text-slate-700 font-semibold px-2 py-0",children:s.version})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-gray-500",children:[e.jsx(m,{variant:"outline",className:"font-normal text-xs",children:s.category}),e.jsxs("span",{children:["Atualizado em: ",F(s.publish_date).format("DD/MM/YYYY")]}),s.issuer&&e.jsx("span",{children:s.issuer}),s.official_url&&s.official_url!=="#"&&e.jsxs("a",{href:s.official_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 flex items-center gap-1 hover:underline ml-1",children:[e.jsx(_,{className:"w-3.5 h-3.5"}),"Fonte Oficial (CAF/FIFA)"]})]})]})]}),s.file_url&&s.file_url!=="#"?e.jsx(r,{asChild:!0,variant:"outline",className:"shrink-0 rounded-full border-2 group-hover:border-red-600 group-hover:text-red-600",children:e.jsxs("a",{href:s.file_url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(u,{className:"w-4 h-4 mr-2"}),"Abrir PDF"]})}):e.jsxs(r,{variant:"outline",disabled:!0,className:"shrink-0 rounded-full border-2",children:[e.jsx(u,{className:"w-4 h-4 mr-2"}),"PDF indisponÃvel"]})]})]})},s.id))}):e.jsxs("div",{className:"text-center py-20 bg-white rounded-3xl border border-gray-100 border-dashed",children:[e.jsx(o,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),e.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Nenhum documento encontrado"}),e.jsx("p",{className:"text-gray-500",children:"Não foi possÃvel encontrar ficheiros para a sua pesquisa."})]})]})})]})}export{O 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.