1import{c as x,r as m,j as e,L as p}from"./index-jArl847u.js";import{u as j}from"./useServerFn-B6DQcslF.js";import{u as b}from"./useQuery-BRvF6KMC.js";import{P as v,S as o,a as u}from"./page-DVBv4Eel.js";import{b as w}from"./admin-stats.functions-bUYjFI-V.js";import{E as y}from"./eye-off-fOtFhMbV.js";import{E as N}from"./eye-B2jyMBBL.js";import{U as k}from"./user-plus-DX84fOFJ.js";import{B as S}from"./book-open-DgAYRGB7.js";import{A}from"./award-D9urIigL.js";import{F as h}from"./file-text-seXVpCEH.js";import{L as P}from"./life-buoy-Cu3E5HRs.js";import{U as C}from"./users-round-AleVBBPM.js";import{M}from"./message-square-BvWSwZyH.js";import{U as E}from"./user-check-C-4Y8tEe.js";import{S as U}from"./shield-check-xFyB6Vvl.js";import{A as q}from"./arrow-right-DDRvqE2X.js";import"./useBaseQuery-CG2qwTzd.js";const L=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M9 14h6",key:"159ibu"}],["path",{d:"M12 17v-6",key:"1y8rbf"}]],F=x("clipboard-plus",L);const B=[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]],f=x("sticky-note",B),I=[{title:"Cadastrar pessoa",to:"/secretaria",icon:k},{title:"Matricular / vÃnculos",to:"/secretaria",icon:F},{title:"Turmas e cursos",to:"/admin/cursos",icon:S},{title:"Emitir certificado",to:"/admin/frequencia",icon:A},{title:"Documentos",to:"/admin/documentos",icon:h},{title:"Papel timbrado",to:"/secretaria/timbrado",icon:f},{title:"Abrir atendimento",to:"/secretaria/atendimentos",icon:P}];function se(){const n=j(w),{data:s,isLoading:d}=b({queryKey:["secretaria-overview"],queryFn:()=>n()}),[a,l]=m.useState(!1);m.useEffect(()=>l(localStorage.getItem("admin-show-stats")==="1"),[]);function g(){l(t=>{const c=!t;return localStorage.setItem("admin-show-stats",c?"1":"0"),c})}const r=t=>a?d?"â¦":(t??0).toLocaleString("pt-BR"):"â¢â¢â¢â¢";return e.jsxs(v,{children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-3xl font-semibold",children:"Secretaria Acadêmica"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Pessoas, matrÃculas, turmas, documentos e atendimento â a partir do cadastro central."})]}),e.jsxs("button",{onClick:g,className:"inline-flex items-center gap-1.5 rounded-lg border px-3 py-1.5 text-xs font-semibold hover:bg-muted","aria-pressed":a,children:[a?e.jsx(y,{className:"h-3.5 w-3.5"}):e.jsx(N,{className:"h-3.5 w-3.5"}),a?"Ocultar números":"Mostrar números"]})]}),e.jsxs("div",{className:"mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsx(o,{label:"Total de pessoas",value:r(s?.totalPessoas),accent:"blue"}),e.jsx(o,{label:"MatrÃculas ativas",value:r(s?.matriculasAtivas),accent:"red"}),e.jsx(o,{label:"Professores",value:r(s?.professores),accent:"purple"}),e.jsx(o,{label:"Turmas em andamento",value:r(s?.turmasEmAndamento),accent:"sky"}),e.jsx(o,{label:"Certificados emitidos",value:r(s?.certificados),accent:"yellow"}),e.jsx(o,{label:"Atendimentos abertos",value:r(s?.atendimentosAbertos),accent:"red"})]}),e.jsx(u,{children:"Ações rápidas"}),e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-7",children:I.map(t=>{const c=t.icon;return e.jsxs(p,{to:t.to,className:"flex flex-col items-center gap-2 rounded-2xl border bg-card p-4 text-center shadow-card transition hover:-translate-y-0.5 hover:shadow-elegant",children:[e.jsx("span",{className:"grid h-10 w-10 place-items-center rounded-xl bg-[#004c97]/10 text-[#004c97]",children:e.jsx(c,{className:"h-5 w-5"})}),e.jsx("span",{className:"text-xs font-medium leading-tight",children:t.title})]},t.title)})}),e.jsx(u,{children:"Acessos da secretaria"}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsx(i,{to:"/secretaria",icon:C,title:"Pessoas",desc:"Cadastro central, busca e pendências"}),e.jsx(i,{to:"/secretaria/atendimentos",icon:M,title:"Atendimento acadêmico",desc:"Chamados e observações"}),e.jsx(i,{to:"/admin/documentos",icon:h,title:"Documentos e modelos",desc:"Modelos e emissão"}),e.jsx(i,{to:"/secretaria/timbrado",icon:f,title:"Papel timbrado",desc:"Fundos por tipo de documento"}),e.jsx(i,{to:"/admin/frequencia",icon:E,title:"Frequência e certificados",desc:"Presença e emissão"}),e.jsx(i,{to:"/admin/usuarios",icon:U,title:"Usuários e acessos",desc:"Perfis e permissões"})]})]})}function i({to:n,icon:s,title:d,desc:a}){return e.jsxs(p,{to:n,className:"group flex items-center gap-4 roun
1ded-2xl border bg-card p-5 shadow-card transition hover:border-[#004c97]/40 hover:shadow-md",children:[e.jsx("span",{className:"grid h-11 w-11 shrink-0 place-items-center rounded-xl bg-[#004c97]/10 text-[#004c97]",children:e.jsx(s,{className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"font-semibold",children:d}),e.jsx("div",{className:"truncate text-sm text-muted-foreground",children:a})]}),e.jsx(q,{className:"h-4 w-4 shrink-0 text-muted-foreground transition group-hover:translate-x-0.5 group-hover:text-foreground"})]})}export{se as component};
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.