PageSourceSearch

https://craibas.al.gov.br/build/assets/Index-Ccq6KPFn.js

js craibas.al.gov.br collected 2026-10-02 23:55:24 UTC 24,083 bytes, 1 lines download raw bytes

1import{c as ss,r as a,j as t,b as me,H as as}from"./app-CTaY8UJf.js";import{B as ls}from"./badge-CwzmSl53.js";import{B as o}from"./button-DXCKLHtj.js";import{D as kt,a as yt,b as wt,c as Ct,d as St,e as Lt}from"./dialog-BKzHwCpL.js";import{I as he}from"./input-7aHhCeCr.js";import{L as Ye}from"./label-CxCrcTSv.js";import{b as Mt,c as rs,a as os,T as zt}from"./tabs-8xzuwqZU.js";import{A as is}from"./app-layout-DHg6PkRO.js";import Ze from"./plus-BsfGhhT4.js";import $t from"./folder-plus-xRsV-xx_.js";import Gt from"./square-pen-DWYckpj2.js";import Ht from"./trash-2-QtamTJOn.js";import Vt from"./link-D5YEb8HE.js";import ns from"./external-link-CKJ9qIH2.js";import ds from"./layers-Cb0hKdx0.js";import Xt from"./search-BOJp92ky.js";import Jt from"./x-DmP7A1Bz.js";import"./app-CNmQMdEi.js";import"./index-sraz7nLe.js";import"./index-CsfSsVkk.js";import"./index-Svmmcv6D.js";import"./index-fQ3brVpV.js";import"./index-msf3AG1t.js";import"./index-DXg2b8Vm.js";import"./index-CJBlix5Q.js";import"./index-DHUBBKJC.js";import"./index-BE_AIKwc.js";import"./video-CWkR2iFG.js";import"./createLucideIcon-CmjF8lT1.js";import"./chevron-right-Dcl2lTY9.js";import"./dropdown-menu-D6OZoFra.js";import"./avatar-BRFzpAWX.js";import"./index-BGC6_Qsa.js";import"./index-C_SHgnPd.js";import"./shield-check-CXJJ4XEh.js";import"./file-text-jraIksbC.js";import"./file-check-tR1YCl9R.js";import"./message-square-BtERmk2L.js";import"./users-BYuco8Ea.js";import"./trending-up-CsQX3MuM.js";import"./handshake-ppgb6oUe.js";import"./calendar-CEIt2YqY.js";import"./trending-down-B7TczfdV.js";import"./building-BaJqVYxM.js";import"./list-Dehc_B-t.js";import"./activity-D1Ey-wIS.js";import"./breadcrumbs-ByKSkPWt.js";function ra(g){const e=ss.c(187),{categories:_t,links:Dt}=g,i=_t===void 0?[]:_t,Et=Dt===void 0?[]:Dt,[Tt,Kt]=a.useState("categories"),[j,Ft]=a.useState(""),[et,l]=a.useState(!1),[k,tt]=a.useState(null),[c,n]=a.useState(""),[fe,st]=a.useState(!1),[b,Ot]=a.useState(""),[N,Qt]=a.useState("all"),[at,r]=a.useState(!1),[y,lt]=a.useState(null),[x,v]=a.useState(""),[m,h]=a.useState(""),[f,p]=a.useState(""),[pe,rt]=a.useState(!1),[ot,d]=a.useState(!1),[u,Rt]=a.useState(null),[ue,At]=a.useState(!1);let ge;e[0]!==l||e[1]!==n?(ge=()=>{tt(null),n(""),l(!0)},e[0]=l,e[1]=n,e[2]=ge):ge=e[2];const It=ge;let be;e[3]!==l||e[4]!==n?(be=s=>{tt(s),n(s.name),l(!0)},e[3]=l,e[4]=n,e[5]=be):be=e[5];const Wt=be;let je;e[6]!==c||e[7]!==k||e[8]!==l||e[9]!==n?(je=s=>{s.preventDefault(),c.trim()&&(st(!0),k?me.put(`/admin/footer-config/categories/${k.id}`,{name:c},{onSuccess:()=>{l(!1),tt(null),n("")},onFinish:()=>st(!1)}):me.post("/admin/footer-config/categories",{name:c},{onSuccess:()=>{l(!1),n("")},onFinish:()=>st(!1)}))},e[6]=c,e[7]=k,e[8]=l,e[9]=n,e[10]=je):je=e[10];const it=je,qt=()=>{lt(null),v(i.length>0?String(i[0].id):""),h(""),p(""),r(!0)};let Ne;e[11]!==v||e[12]!==r||e[13]!==h||e[14]!==p?(Ne=s=>{lt(s),v(String(s.category_id)),h(s.name),p(s.url),r(!0)},e[11]=v,e[12]=r,e[13]=h,e[14]=p,e[15]=Ne):Ne=e[15];const Yt=Ne;let ve;e[16]!==y||e[17]!==x||e[18]!==m||e[19]!==f||e[20]!==r||e[21]!==h||e[22]!==p?(ve=s=>{s.preventDefault(),!(!m.trim()||!f.trim()||!x)&&(rt(!0),y?me.put(`/admin/footer-config/links/${y.id}`,{category_id:x,name:m,url:f},{onSuccess:()=>{r(!1),lt(null),h(""),p("")},onFinish:()=>rt(!1)}):me.post("/admin/footer-config/links",{category_id:x,name:m,url:f},{onSuccess:()=>{r(!1),h(""),p("")},onFinish:()=>rt(!1)}))},e[16]=y,e[17]=x,e[18]=m,e[19]=f,e[20]=r,e[21]=h,e[22]=p,e[23]=ve):ve=e[23];const nt=ve;let ke;e[24]!==d?(ke=(s,Nt,vt)=>{Rt({type:s,id:Nt,name:vt}),d(!0)},e[24]=d,e[25]=ke):ke=e[25];const Bt=ke;let ye;e[26]!==u||e[27]!==d?(ye=()=>{if(!u)return;At(!0);const s=u.type==="category"?`/admin/footer-config/categories/${u.id}`:`/admin/footer-config/links/${u.id}`;me.delete(s,{onSuccess:()=>{d(!1),Rt(null)},onFinish:()=>At(!1)})},e[26]=u,e[27]=d,e[28]=ye):ye=e[28];const dt=ye;let we;e[29]!==j?(we=s=>s.name.toLowerCase().includes(j.toLowerCase()),e[29]=j,e[30]=we):we=e[30];const Pt=i.filter(we);let Ce;e[31]!==b||e[32]!==N?(Ce=s=>{const Nt=s.name.toLowerCase().includes(b.toLowerCase())||s.url.toLowerCase().includes(b.toLowerCase())||s.category?.name.toLowerCase().includes(b.toLowerCase()),vt=N==="all"||String(s.category_id)===N;return Nt&&vt},e[31]=b,e[32]=N,e[33]=Ce):Ce=e[33];const Ut=Et.filter(Ce);let Se,Le;e[34]===Symbol.for("react.memo_cache_sentinel")?(Se=[{title:"Admin",href:"/admin"},{title:"Configurações do Rodapé",href:"/admin/footer-config"}],Le=t.jsx(as,{title:"Configurações do Rodapé - Admin"}),e[34]=Se,e[35]=Le):(Se=e[34],Le=e[35]);let _e;e[36]===Symbol.for("react.memo_cache_sentinel")?(_e=t.jsxs("div",{children:[t.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 text-xs font-bold text-slate-700 dark:bg-slate-800 dark:text-slate-300",children:[t.jsx(ds,{className:"h-3.5 w-3.5"}),t.jsx("span",{children:"Gerenciamento Unificado"})]}),t.jsx("h1",{className:"mt-2 text-2xl font-black tracking-tight text-slate-900 dark:text-white sm:text-3xl",children:"Configurações do Rodapé"}),t.jsx("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400 sm:text-sm",children:"Gerencie as categorias e os links institucionais exibid
1os no rodapé do portal público."})]}),e[36]=_e):_e=e[36];const ct=Tt==="categories"?t.jsxs(o,{type:"button",onClick:It,className:"rounded-xl shadow-md transition hover:scale-105",children:[t.jsx(Ze,{className:"mr-2 h-4 w-4"}),"Nova Categoria"]}):t.jsxs(o,{type:"button",onClick:qt,disabled:i.length===0,className:"rounded-xl shadow-md transition hover:scale-105",children:[t.jsx(Ze,{className:"mr-2 h-4 w-4"}),"Novo Link"]});let De;e[37]!==ct?(De=t.jsxs("div",{className:"mb-8 flex flex-col justify-between gap-4 md:flex-row md:items-center",children:[_e,t.jsx("div",{className:"flex items-center gap-3",children:ct})]}),e[37]=ct,e[38]=De):De=e[38];let Ee;e[39]===Symbol.for("react.memo_cache_sentinel")?(Ee=s=>Kt(s),e[39]=Ee):Ee=e[39];let Te;e[40]===Symbol.for("react.memo_cache_sentinel")?(Te=t.jsx($t,{className:"mr-2 h-4 w-4"}),e[40]=Te):Te=e[40];let Fe;e[41]===Symbol.for("react.memo_cache_sentinel")?(Fe=t.jsx(Vt,{className:"mr-2 h-4 w-4"}),e[41]=Fe):Fe=e[41];let Oe;e[42]===Symbol.for("react.memo_cache_sentinel")?(Oe=t.jsx(Xt,{className:"absolute top-1/2 left-3.5 h-4 w-4 -translate-y-1/2 text-slate-400"}),e[42]=Oe):Oe=e[42];let Re;e[43]===Symbol.for("react.memo_cache_sentinel")?(Re=s=>Ft(s.target.value),e[43]=Re):Re=e[43];let w,C;e[44]!==j?(w=t.jsx(he,{type:"text",placeholder:"Buscar categorias por nome...",value:j,onChange:Re,className:"h-11 rounded-xl border-slate-200 bg-white pl-10 text-xs shadow-xs focus:bg-white dark:border-slate-800 dark:bg-slate-900"}),C=j&&t.jsx("button",{type:"button",onClick:()=>Ft(""),className:"absolute top-1/2 right-3 -translate-y-1/2 text-slate-400 hover:text-slate-600 dark:hover:text-white",children:t.jsx(Jt,{className:"h-4 w-4"})}),e[44]=j,e[45]=w,e[46]=C):(w=e[45],C=e[46]);let S;e[47]!==w||e[48]!==C?(S=t.jsx("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:t.jsxs("div",{className:"relative max-w-md flex-1",children:[Oe,w,C]})}),e[47]=w,e[48]=C,e[49]=S):S=e[49];const xt=Pt.length===0?t.jsxs("div",{className:"p-12 text-center",children:[t.jsx($t,{className:"mx-auto h-12 w-12 text-slate-300 dark:text-slate-600"}),t.jsx("h3",{className:"mt-3 text-base font-bold text-slate-700 dark:text-slate-200",children:"Nenhuma categoria encontrada"}),t.jsx("p",{className:"mt-1 text-xs text-slate-500",children:'Clique em "Nova Categoria" para adicionar uma seção ao rodapé.'}),t.jsxs(o,{type:"button",onClick:It,variant:"outline",className:"mt-4 rounded-xl text-xs font-semibold",children:[t.jsx(Ze,{className:"mr-1.5 h-3.5 w-3.5"}),"Criar Primeira Categoria"]})]}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full text-left text-xs",children:[t.jsx("thead",{className:"border-b border-slate-100 bg-slate-50 text-[11px] font-bold text-slate-500 uppercase dark:border-slate-800 dark:bg-slate-800/50 dark:text-slate-400",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-4",children:"ID"}),t.jsx("th",{className:"px-6 py-4",children:"Nome da Categoria"}),t.jsx("th",{className:"px-6 py-4 text-center",children:"Total de Links"}),t.jsx("th",{className:"px-6 py-4",children:"Criado em"}),t.jsx("th",{className:"px-6 py-4 text-right",children:"Ações"})]})}),t.jsx("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-800",children:Pt.map(s=>t.jsxs("tr",{className:"transition-colors hover:bg-slate-50/80 dark:hover:bg-slate-800/40",children:[t.jsxs("td",{className:"px-6 py-4 font-mono font-bold text-slate-400",children:["#",s.id]}),t.jsx("td",{className:"px-6 py-4",children:t.jsx("div",{className:"font-extrabold text-slate-900 dark:text-white",children:s.name})}),t.jsx("td",{className:"px-6 py-4 text-center",children:t.jsxs(ls,{variant:"secondary",className:"rounded-full px-2.5 py-0.5 text-[11px] font-bold",children:[s.links_count??0," link",(s.links_count??0)===1?"":"s"]})}),t.jsx("td",{className:"px-6 py-4 text-slate-500 dark:text-slate-400",children:new Date(s.created_at).toLocaleDateString("pt-BR")}),t.jsx("td",{className:"px-6 py-4 text-right",children:t.jsxs("div",{className:"flex items-center justify-end gap-1.5",children:[t.jsx(o,{type:"button",size:"sm",variant:"ghost",onClick:()=>Wt(s),className:"h-8 w-8 rounded-lg p-0 text-slate-600 hover:bg-slate-100 hover:text-slate-900 dark:text-slate-300 dark:hover:bg-slate-800 dark:hover:text-white",title:"Editar",children:t.jsx(Gt,{className:"h-3.5 w-3.5"})}),t.jsx(o,{type:"button",size:"sm",variant:"ghost",onClick:()=>Bt("category",s.id,s.name),className:"h-8 w-8 rounded-lg p-0 text-rose-500 hover:bg-rose-50 hover:text-rose-600 dar
1k:hover:bg-rose-950/40",title:"Excluir",children:t.jsx(Ht,{className:"h-3.5 w-3.5"})})]})})]},s.id))})]})});let L;e[50]!==xt?(L=t.jsx("div",{className:"overflow-hidden rounded-2xl border border-slate-200/80 bg-white shadow-xs dark:border-slate-800 dark:bg-slate-900",children:xt}),e[50]=xt,e[51]=L):L=e[51];let Ae;e[52]!==S||e[53]!==L?(Ae=t.jsxs(Mt,{value:"categories",className:"space-y-6",children:[S,L]}),e[52]=S,e[53]=L,e[54]=Ae):Ae=e[54];const mt=Mt,Zt="links",es="space-y-6";let Ie;e[55]===Symbol.for("react.memo_cache_sentinel")?(Ie=t.jsx(Xt,{className:"absolute top-1/2 left-3.5 h-4 w-4 -translate-y-1/2 text-slate-400"}),e[55]=Ie):Ie=e[55];let qe;e[56]===Symbol.for("react.memo_cache_sentinel")?(qe=s=>Ot(s.target.value),e[56]=qe):qe=e[56];let _,D;e[57]!==b?(_=t.jsx(he,{type:"text",placeholder:"Buscar por nome do link ou URL...",value:b,onChange:qe,className:"h-11 rounded-xl border-slate-200 bg-white pl-10 text-xs shadow-xs focus:bg-white dark:border-slate-800 dark:bg-slate-900"}),D=b&&t.jsx("button",{type:"button",onClick:()=>Ot(""),className:"absolute top-1/2 right-3 -translate-y-1/2 text-slate-400 hover:text-slate-600 dark:hover:text-white",children:t.jsx(Jt,{className:"h-4 w-4"})}),e[57]=b,e[58]=_,e[59]=D):(_=e[58],D=e[59]);let E;e[60]!==_||e[61]!==D?(E=t.jsxs("div",{className:"relative max-w-md flex-1",children:[Ie,_,D]}),e[60]=_,e[61]=D,e[62]=E):E=e[62];let Be;e[63]===Symbol.for("react.memo_cache_sentinel")?(Be=s=>Qt(s.target.value),e[63]=Be):Be=e[63];let Pe;e[64]===Symbol.for("react.memo_cache_sentinel")?(Pe=t.jsx("option",{value:"all",children:"Todas as Categorias"}),e[64]=Pe):Pe=e[64];let T;e[65]!==i?(T=i.map(xs),e[65]=i,e[66]=T):T=e[66];let F;e[67]!==N||e[68]!==T?(F=t.jsxs("select",{value:N,onChange:Be,className:"h-11 rounded-xl border border-slate-200 bg-white px-3 text-xs font-semibold text-slate-700 shadow-xs focus:outline-none focus:ring-2 focus:ring-slate-900 dark:border-slate-800 dark:bg-slate-900 dark:text-slate-200",children:[Pe,T]}),e[67]=N,e[68]=T,e[69]=F):F=e[69];let O;e[70]!==E||e[71]!==F?(O=t.jsx("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:t.jsxs("div",{className:"flex flex-1 flex-col gap-3 sm:flex-row sm:items-center",children:[E,F]})}),e[70]=E,e[71]=F,e[72]=O):O=e[72];const ts="overflow-hidden rounded-2xl border border-slate-200/80 bg-white shadow-xs dark:border-slate-800 dark:bg-slate-900",ht=Ut.length===0?t.jsxs("div",{className:"p-12 text-center",children:[t.jsx(Vt,{className:"mx-auto h-12 w-12 text-slate-300 dark:text-slate-600"}),t.jsx("h3",{className:"mt-3 text-base font-bold text-slate-700 dark:text-slate-200",children:"Nenhum link encontrado"}),t.jsx("p",{className:"mt-1 text-xs text-slate-500",children:i.length===0?"Crie primeiro uma categoria antes de adicionar links.":'Clique em "Novo Link" para adicionar atalhos ao rodapé.'}),i.length>0&&t.jsxs(o,{type:"button",onClick:qt,variant:"outline",className:"mt-4 rounded-xl text-xs font-semibold",children:[t.jsx(Ze,{className:"mr-1.5 h-3.5 w-3.5"}),"Criar Primeiro Link"]})]}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full text-left text-xs",children:[t.jsx("thead",{className:"border-b border-slate-100 bg-slate-50 text-[11px] font-bold text-slate-500 uppercase dark:border-slate-800 dark:bg-slate-800/50 dark:text-slate-400",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-4",children:"ID"}),t.jsx("th",{className:"px-6 py-4",children:"Categoria"}),t.jsx("th",{className:"px-6 py-4",children:"Nome do Link"}),t.jsx("th",{className:"px-6 py-4",children:"Destino (URL)"}),t.jsx("th",{className:"px-6 py-4",children:"Criado em"}),t.jsx("th",{className:"px-6 py-4 text-right",children:"Ações"})]})}),t.jsx("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-800",children:Ut.map(s=>t.jsxs("tr",{className:"transition-colors hover:bg-slate-50/80 dark:hover:bg-slate-800/40",children:[t.jsxs("td",{className:"px-6 py-4 font-mono font-bold text-slate-400",children:["#",s.id]}),t.jsx("td",{className:"px-6 py-4",children:t.jsx("span",{className:"inline-flex items-center rounded-lg bg-slate-100 px-2.5 py-1 text-[11px] font-bold text-slate-800 dark:bg-slate-800 dark:text-slate-200",children:s.category?.name||"Sem categoria"})}),t.jsx("td",{className:"px-6 py-4",children:t.jsx("div",{className:"font-extrabold text-slate-900 dark:text-white",children:s.name})}),t.jsx("td",{className:"px-6 py-4",children:t.jsxs("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 font-mono text-[11px] text-blue-600 hover:underline dark:text-blue-400",children:[t.jsx("span",{className:"max-w-[200px] truncate",children:s.url}),t.jsx(ns,{className:"h-3 w-3 shrink-0"})]})}),t.jsx("td",{className:"px-6 py-4 text-slate-500 dark:text-slate-400",children:new Date(s.created_at).toLocaleDateString("pt-BR")}),t.jsx("td",{className:"px-6 py-4 text-right",children:t.jsxs("div",{className:"flex items-center justify-end gap-1.5",children:[t.jsx(o,{type:"button",size:"sm",variant:"ghost",onClick:()=>Yt(s),className:"h-8 w-8 rounded-lg p-0 text-slate-600 hover:bg-slate-100 hover:text-slate-900 dark:text-slate-300 dark:hover:bg-slate-800 dark:hover:text-white",title:"Editar",children:t.jsx(Gt,{className:"h-3.5 w-3.5"})}),t.jsx(o,{type:"button",size:"sm",variant:"ghost",onClick:()=>Bt("link",s.id,s.name),className:"h-8 w-8 rounded-lg p-0 text-rose-500 hover:bg-rose-50 hover:text-rose-600 dar
1k:hover:bg-rose-950/40",title:"Excluir",children:t.jsx(Ht,{className:"h-3.5 w-3.5"})})]})})]},s.id))})]})});let R;e[73]!==ht?(R=t.jsx("div",{className:ts,children:ht}),e[73]=ht,e[74]=R):R=e[74];let Ue;e[75]!==mt||e[76]!==O||e[77]!==R?(Ue=t.jsxs(mt,{value:Zt,className:es,children:[O,R]}),e[75]=mt,e[76]=O,e[77]=R,e[78]=Ue):Ue=e[78];const ft=k?"Editar Categoria":"Nova Categoria do Rodapé";let A;e[79]!==ft?(A=t.jsx(kt,{className:"text-lg font-bold text-slate-900 dark:text-white",children:ft}),e[79]=ft,e[80]=A):A=e[80];let Me;e[81]===Symbol.for("react.memo_cache_sentinel")?(Me=t.jsx(yt,{className:"text-xs text-slate-500",children:"Digite o nome da seção que agrupará os links no rodapé público."}),e[81]=Me):Me=e[81];let I;e[82]!==A?(I=t.jsxs(wt,{children:[A,Me]}),e[82]=A,e[83]=I):I=e[83];let ze;e[84]===Symbol.for("react.memo_cache_sentinel")?(ze=t.jsx(Ye,{htmlFor:"cat-name",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Nome da Categoria *"}),e[84]=ze):ze=e[84];let q;e[85]!==n?(q=s=>n(s.target.value),e[85]=n,e[86]=q):q=e[86];let B;e[87]!==c||e[88]!==q?(B=t.jsx("div",{className:"my-6 space-y-4",children:t.jsxs("div",{className:"space-y-1.5",children:[ze,t.jsx(he,{id:"cat-name",type:"text",placeholder:"Ex: Estrutura do Governo, Transparência...",value:c,onChange:q,required:!0,className:"h-11 rounded-xl text-xs"})]})}),e[87]=c,e[88]=q,e[89]=B):B=e[89];let P;e[90]!==l?(P=t.jsx(o,{type:"button",variant:"outline",onClick:()=>l(!1),className:"rounded-xl text-xs font-semibold",children:"Cancelar"}),e[90]=l,e[91]=P):P=e[91];let U;e[92]!==c||e[93]!==fe?(U=fe||!c.trim(),e[92]=c,e[93]=fe,e[94]=U):U=e[94];const pt=fe?"Salvando...":k?"Salvar Alterações":"Criar Categoria";let M;e[95]!==U||e[96]!==pt?(M=t.jsx(o,{type:"submit",disabled:U,className:"rounded-xl text-xs font-bold",children:pt}),e[95]=U,e[96]=pt,e[97]=M):M=e[97];let z;e[98]!==P||e[99]!==M?(z=t.jsxs(Ct,{className:"gap-2 sm:gap-0",children:[P,M]}),e[98]=P,e[99]=M,e[100]=z):z=e[100];let $;e[101]!==it||e[102]!==I||e[103]!==B||e[104]!==z?($=t.jsx(St,{className:"sm:max-w-md rounded-3xl",children:t.jsxs("form",{onSubmit:it,children:[I,B,z]})}),e[101]=it,e[102]=I,e[103]=B,e[104]=z,e[105]=$):$=e[105];let $e;e[106]!==et||e[107]!==l||e[108]!==$?($e=t.jsx(Lt,{open:et,onOpenChange:l,children:$}),e[106]=et,e[107]=l,e[108]=$,e[109]=$e):$e=e[109];const ut=y?"Editar Link":"Novo Link do Rodapé";let G;e[110]!==ut?(G=t.jsx(kt,{className:"text-lg font-bold text-slate-900 dark:text-white",children:ut}),e[110]=ut,e[111]=G):G=e[111];let Ge;e[112]===Symbol.for("react.memo_cache_sentinel")?(Ge=t.jsx(yt,{className:"text-xs text-slate-500",children:"Preencha a categoria, o texto do link e a URL de destino."}),e[112]=Ge):Ge=e[112];let H;e[113]!==G?(H=t.jsxs(wt,{children:[G,Ge]}),e[113]=G,e[114]=H):H=e[114];let He;e[115]===Symbol.for("react.memo_cache_sentinel")?(He=t.jsx(Ye,{htmlFor:"link-cat",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Categoria do Rodapé *"}),e[115]=He):He=e[115];let V;e[116]!==v?(V=s=>v(s.target.value),e[116]=v,e[117]=V):V=e[117];let Ve;e[118]===Symbol.for("react.memo_cache_sentinel")?(Ve=t.jsx("option",{value:"",disabled:!0,children:"Selecione uma categoria..."}),e[118]=Ve):Ve=e[118];let X;e[119]!==i?(X=i.map(cs),e[119]=i,e[120]=X):X=e[120];let J;e[121]!==x||e[122]!==V||e[123]!==X?(J=t.jsxs("div",{className:"space-y-1.5",children:[He,t.jsxs("select",{id:"link-cat",value:x,onChange:V,required:!0,className:"h-11 w-full rounded-xl border border-slate-200 bg-white px-3 text-xs font-semibold text-slate-800 shadow-xs focus:outline-none focus:ring-2 focus:ring-slate-900 dark:border-slate-800 dark:bg-slate-900 dark:text-slate-200",children:[Ve,X]})]}),e[121]=x,e[122]=V,e[123]=X,e[124]=J):J=e[124];let Xe;e[125]===Symbol.for("react.memo_cache_sentinel")?(Xe=t.jsx(Ye,{htmlFor:"link-name",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Título do Link *"}),e[125]=Xe):Xe=e[125];let K;e[126]!==h?(K=s=>h(s.target.value),e[126]=h,e[127]=K):K=e[127];let Q;e[128]!==m||e[129]!==K?(Q=t.jsxs("div",{className:"space-y-1.5",children:[Xe,t.jsx(he,{id:"link-name",type:"text",placeholder:"Ex: Portal da Transparência, Ouvidoria...",value:m,onChange:K,required:!0,className:"h-11 rounded-xl text-xs"})]}),e[128]=m,e[129]=K,e[130]=Q):Q=e[130];let Je;e[131]===Symbol.for("react.memo_cache_sentinel")?(Je=t.jsx(Ye,{htmlFor:"link-url",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"URL / Caminho de Destino *"}),e[131]=Je):Je=e[131];let W;e[132]!==p?(W=s=>p(s.target.value),e[132]=p,e[133]=W):W=e[133];let Y;e[134]!==f||e[135]!==W?(Y=t.jsxs("div",{className:"space-y-1.5",children:[Je,t.jsx(he,{id:"link-url",type:"text",placeholder:"Ex: /transparencia ou https://externo.com",value:f,onChange:W,required:!0,className:"h-11 rounded-xl font-mono text-xs"})]}),e[134]=f,e[135]=W,e[136]=Y):Y=e[136];let Z;e[137]!==J||e[138]!==Q||e[139]!==Y?(Z=t.jsxs("div",{className:"my-6 space-y-4",children:[J,Q,Y]}),e[137]=J,e[138]=Q,e[139]=Y,e[140]=Z):Z=e[140];let ee;e[141]!==r?(ee=t.jsx(o,{type:"button",variant:"outline",onClick:()=>r(!1),className:"rounded-xl text-xs font-semibold",children:"Cancelar"}),e[141]=r,e[142]=ee):ee=e[142];let te;e[143]!==pe||e[144]!==x||e[145]!==m||e[146]!==f?(te=pe||!m.trim()||!f.trim()||!x,e[143]=pe,e[144]=x,e[145]=m,e[146]=f,e[147]=te):te=e[147];const gt=pe?"Salvando...":y?"Salvar Alterações":"Criar Link";let se;e[148]!==te||e[149]!==gt?(se=t.jsx(o,{type:"submit",disabled:te,className:"rounded-xl text-xs font-bold",children:gt}),e[148]=te,e[149]=gt,e[150]=se):se=e[150];let ae;e[151]!==ee||e[152]!==se?(ae=t.jsxs(Ct,{className:"gap-2 sm:gap-0",children:[ee,se]}),e[151]=ee,e[152]=se,e[153]=ae):ae=e[153];let le;e[154]!==nt||e[155]!==H||e[156]!==Z||e[157]!==ae?(le=t.jsx(St,{className:"sm:max-w-lg rounded-3xl",children:t.jsxs("form",{onSubmit:nt,children:[H,Z,ae]})}),e[154]=nt,e[155]=H,e[156]=Z,e[157]=ae,e[158]=le):le=e[158];let Ke;e[159]!==at||e[160]!==r||e[161]!==le?(Ke=t.jsx(Lt,{open:at,onOpenChange:r,children:le}),e[159]=at,e[160]=r,e[161]=le,e[162]=Ke):Ke=e[162];let Qe;e[163]===Symbol.for("react.memo_cache_sentinel")?(Qe=t.jsx(kt,{className:"text-lg font-bold text-rose-600",children:"Confirmar Exclusão"}),e[163]=Qe):Qe=e[163];const bt=u?.name;let re;e[164]!==bt?(re=t.jsx("strong",{children:bt}),e[164]=bt,e[165]=re):re=e[165];let oe;e[166]!==u?.type?(oe=u?.type==="category"&&t.jsx("span",{className:"block mt-1 text-rose-500 font-semibold",children:"Atenção: Todos os links vinculados a esta categoria também serão excluídos."}),e[166]=u?.type,e[167]=oe):oe=e[167];let ie;e[168]!==re||e[169]!==oe?(ie=t.jsxs(wt,{children:[Qe,t.jsxs(yt,{className:"text-xs text-slate-500",children:["Tem certeza que deseja excluir"," ",re,"?",oe]})]}),e[168]=re,e[169]=oe,e[170]=ie):ie=e[170];let ne;e[171]!==d?(ne=t.jsx(o,{type:"button",variant:"outline",onClick:()=>d(!1),className:"rounded-xl text-xs font-semibold",children:"Cancelar"}),e[171]=d,e[172]=ne):ne=e[172];const jt=ue?"Excluindo...":"Confirmar e Excluir";let de;e[173]!==dt||e[174]!==ue||e[175]!==jt?(de=t.jsx(o,{type:"button",variant:"destructive",onClick:dt,disabled:ue,className:"rounded-xl text-xs font-bold",children:jt}),e[173]=dt,e[174]=ue,e[175]=jt,e[176]=de):de=e[176];let ce;e[177]!==ne||e[178]!==de?(ce=t.jsxs(Ct,{className:"gap-2 sm:gap-0",children:[ne,de]}),e[177]=ne,e[178]=de,e[179]=ce):ce=e[179];let xe;e[180]!==ie||e[181]!==ce?(xe=t.jsxs(St,{className:"sm:max-w-md rounded-3xl",children:[ie,ce]}),e[180]=ie,e[181]=ce,e[182]=xe):xe=e[182];let We;
1return e[183]!==ot||e[184]!==d||e[185]!==xe?(We=t.jsx(Lt,{open:ot,onOpenChange:d,children:xe}),e[183]=ot,e[184]=d,e[185]=xe,e[186]=We):We=e[186],t.jsxs(is,{breadcrumbs:Se,children:[Le,t.jsxs("div",{className:"container mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8",children:[De,t.jsxs(rs,{value:Tt,onValueChange:Ee,className:"w-full space-y-6",children:[t.jsxs(os,{className:"grid h-12 w-full max-w-md grid-cols-2 rounded-2xl bg-slate-100 p-1 dark:bg-slate-800",children:[t.jsxs(zt,{value:"categories",className:"rounded-xl text-xs font-bold transition data-[state=active]:bg-white data-[state=active]:text-slate-900 data-[state=active]:shadow-sm dark:data-[state=active]:bg-slate-900 dark:data-[state=active]:text-white",children:[Te,"Footer Categorias (",i.length,")"]}),t.jsxs(zt,{value:"links",className:"rounded-xl text-xs font-bold transition data-[state=active]:bg-white data-[state=active]:text-slate-900 data-[state=active]:shadow-sm dark:data-[state=active]:bg-slate-900 dark:data-[state=active]:text-white",children:[Fe,"Footer Links (",Et.length,")"]})]}),Ae,Ue]})]}),$e,Ke,We]})}function cs(g){return t.jsx("option",{value:String(g.id),children:g.name},g.id)}function xs(g){return t.jsx("option",{value:String(g.id),children:g.name},g.id)}export{ra 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.