PageSourceSearch

https://serrabranca.pb.gov.br/assets/index-DWETgQ0J.js

js serrabranca.pb.gov.br collected 2026-09-25 09:09:28 UTC 2,524 bytes, 1 lines download raw bytes

1import{j as e}from"./app-Con2Uz40.js";import{r as d,H as u}from"./vendor-inertia-BMF_YWrS.js";import{A as p}from"./AdminLayout-B09P9NBj.js";import{P as x,g as o,E as f,C as g,n as m,R as h,o as j,f as b,p as v}from"./ui-DlMH4Qp3.js";import{ae as l,H as N,I as y}from"./vendor-icons-CKF1xuco.js";import"./FlashMessages-Bc9lB5dL.js";import"./campaigns-BMBq-BQU.js";import"./useFocusTrap-Cq0uZysT.js";const q={LAI:"LAI",transparencia:"Transparência",servicos:"Serviços",participação:"Participação","sobre-a-prefeitura":"Sobre a Prefeitura"};function L({items:s}){const[c,i]=d.useState(null),n=s.reduce((a,r)=>(a[r.category]||(a[r.category]=[]),a[r.category].push(r),a),{});return e.jsxs(p,{title:"Perguntas Frequentes",children:[e.jsx(u,{title:"FAQ - Painel"}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(x,{publicHref:"/perguntas-frequentes",eyebrow:"Conteúdo",icon:l,title:"Perguntas Frequentes",description:`${s.length} pergunta(s) em ${Object.keys(n).length} categoria(s)`,variant:"hero",actions:e.jsx(o,{href:"/painel/faq/criar",children:"Nova Pergunta"})}),s.length===0?e.jsx(f,{icon:l,title:"Nenhuma pergunta cadastrada",description:"Crie a primeira pergunta frequente para exibir no site.",action:e.jsx(o,{href:"/painel/faq/criar",children:"Nova Pergunta"})}):e.jsx("div",{className:"space-y-6",children:Object.entries(n).map(([a,r])=>e.jsxs("div",{children:[e.jsxs("h3",{className:"text-xs font-bold text-muted-foreground uppercase tracking-wider mb-3 px-1",children:[q[a]||a," (",r.length,")"]}),e.jsx(g,{padding:!1,className:"divide-y divide-border/70",children:r.map(t=>e.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 hover:bg-muted/40 transition-colors",children:[e.jsxs("div",{className:"flex-1 min-w-0 mr-4",children:[e.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:t.question}),e.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:t.answer.replace(/<[^>]+>/g,"").substring(0,120)})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[!t.is_active&&e.jsx(m,{status:"inactive"}),e.jsxs(h,{children:[e.jsx(j,{tone:"edit",href:`/painel/faq/${t.id}/editar`,title:"Editar",children:e.jsx(N,{className:"w-4 h-4"})}),e.jsx(b,{tone:"delete",title:"Excluir",onClick:()=>i({id:t.id,label:`${t.question.substring(0,50)}...`}),children:e.jsx(y,{className:"w-4 h-4"})})]})]})]},t.id))})]},a))})]}),e.jsx(v,{target:c,onClose:()=>i(null),deleteUrl:a=>`/painel/faq/${a}`,entity:"pergunta"})]})}export{L 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.