1import{j as e}from"./app-Con2Uz40.js";import{r as o,H as l}from"./vendor-inertia-BMF_YWrS.js";import{A as c}from"./AdminLayout-B09P9NBj.js";import{P as d,g as i,E as x,C as m,n as h,R as p,o as u,f as v,p as j}from"./ui-DlMH4Qp3.js";import{J as r,r as f,H as g,I as N}from"./vendor-icons-CKF1xuco.js";import"./FlashMessages-Bc9lB5dL.js";import"./campaigns-BMBq-BQU.js";import"./useFocusTrap-Cq0uZysT.js";function H({items:a}){const[n,t]=o.useState(null);return e.jsxs(c,{title:"Carta de Serviços",children:[e.jsx(l,{title:"Carta de Serviços - Painel"}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(d,{publicHref:"/carta-de-servicos",eyebrow:"Executivo",icon:r,title:"Carta de Serviços",description:`${a.length} serviço(s) ao cidadão`,variant:"hero",actions:e.jsx(i,{href:"/painel/carta-de-servicos/criar",children:"Novo serviço"})}),a.length===0?e.jsx(x,{icon:r,title:"Nenhum serviço cadastrado",description:"Cadastre os serviços ao cidadão (Certidão Negativa, IPTU, ITBI...).",action:e.jsx(i,{href:"/painel/carta-de-servicos/criar",children:"Novo serviço"})}):e.jsx(m,{padding:!1,className:"divide-y divide-border/70",children:a.map(s=>e.jsxs("div",{className:"flex items-center justify-between px-4 sm:px-5 py-3.5 hover:bg-muted/40 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 mr-4",children:[s.icone_url?e.jsx("img",{src:s.icone_url,alt:"",className:"w-9 h-9 rounded-lg object-contain border border-border bg-muted p-1 shrink-0"}):e.jsx("span",{className:"w-9 h-9 rounded-lg bg-navy/10 text-navy flex items-center justify-center shrink-0",children:e.jsx(r,{className:"w-4 h-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),s.link&&e.jsxs("p",{className:"text-xs text-muted-foreground truncate mt-0.5 flex items-center gap-1",children:[e.jsx(f,{className:"w-3 h-3 shrink-0"}),s.link]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[!s.is_active&&e.jsx(h,{status:"inactive"}),e.jsxs(p,{children:[e.jsx(u,{tone:"edit",href:`/painel/carta-de-servicos/${s.id}/editar`,title:"Editar",children:e.jsx(g,{className:"w-4 h-4"})}),e.jsx(v,{tone:"delete",title:"Excluir",onClick:()=>t({id:s.id,label:s.title}),children:e.jsx(N,{className:"w-4 h-4"})})]})]})]},s.id))})]}),e.jsx(j,{target:n,onClose:()=>t(null),deleteUrl:s=>`/painel/carta-de-servicos/${s}`,entity:"serviço"})]})}export{H 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.