1import{c as _t,u as Mt,r as q,j as a,b as $e,H as $t,a as yt}from"./app-CTaY8UJf.js";import{P as zt}from"./PaginationFixed-iLESiNIA.js";import{B as bt}from"./badge-CwzmSl53.js";import{B}from"./button-DXCKLHtj.js";import{D as ft,a as pt,b as ut,c as jt,d as gt,e as Nt}from"./dialog-BKzHwCpL.js";import{D as wt,a as St,b as Ct,c as ze}from"./dropdown-menu-D6OZoFra.js";import{I as te}from"./input-7aHhCeCr.js";import{L as ee}from"./label-CxCrcTSv.js";import{T as ae,a as d,b as Et,c as S,d as At,e as Tt}from"./table-Cb1Hol7G.js";import{T as vt,a as Rt,b as kt,c as Vt}from"./tabs-8xzuwqZU.js";import{A as Lt}from"./AppLayoutWithNotifications-mus8tTbI.js";import Dt from"./ellipsis-DmaWUrvi.js";import Ht from"./eye-BixEHFrD.js";import Pt from"./pencil-TRb729mG.js";import Ft from"./trash-2-QtamTJOn.js";import{D as Gt}from"./users-BYuco8Ea.js";import Bt from"./plus-BsfGhhT4.js";import It from"./file-text-jraIksbC.js";import Ot from"./layers-Cb0hKdx0.js";import qt from"./search-BOJp92ky.js";import Ut from"./x-DmP7A1Bz.js";import"./app-CNmQMdEi.js";import"./index-sraz7nLe.js";import"./index-CsfSsVkk.js";import"./index-Svmmcv6D.js";import"./index-DXg2b8Vm.js";import"./index-CJBlix5Q.js";import"./index-DHUBBKJC.js";import"./index-msf3AG1t.js";import"./index-fQ3brVpV.js";import"./circle-alert-CTn79Wf8.js";import"./createLucideIcon-CmjF8lT1.js";import"./circle-x-VMcb1sXz.js";import"./circle-check-big-0QGs7tCc.js";import"./app-layout-DHg6PkRO.js";import"./index-BE_AIKwc.js";import"./video-CWkR2iFG.js";import"./chevron-right-Dcl2lTY9.js";import"./avatar-BRFzpAWX.js";import"./index-BGC6_Qsa.js";import"./index-C_SHgnPd.js";import"./shield-check-CXJJ4XEh.js";import"./file-check-tR1YCl9R.js";import"./message-square-BtERmk2L.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";const dt=e=>{if(e==null||e==="")return"â";const t=Number(e);return Number.isNaN(t)?"â":new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(t)},Wt=e=>e?`/storage/${e}`:null;function Xt(e){const t=_t.c(67),{aba:l}=e,[w,k]=q.useState(!1),[I,i]=q.useState(!1);let m;t[0]!==l.name?(m={name:l.name},t[0]=l.name,t[1]=m):m=t[1];const{data:U,setData:x,put:z,processing:f,errors:M}=yt(m);let c;t[2]!==l.id||t[3]!==z?(c=()=>{z(`/portal/admin/emendas-parlamentares/abas/${l.id}`,{preserveScroll:!0,onSuccess:()=>k(!1)})},t[2]=l.id,t[3]=z,t[4]=c):c=t[4];const C=c;let n;t[5]!==l.id?(n=()=>{$e.delete(`/portal/admin/emendas-parlamentares/abas/${l.id}`,{preserveScroll:!0,onSuccess:()=>i(!1)})},t[5]=l.id,t[6]=n):n=t[6];const E=n;if(w){let L;t[7]!==l.id?(L=a.jsxs(d,{className:"font-mono text-xs text-slate-400",children:["#",l.id]}),t[7]=l.id,t[8]=L):L=t[8];let H;t[9]!==x?(H=Z=>x("name",Z.target.value),t[9]=x,t[10]=H):H=t[10];let T;t[11]!==U.name||t[12]!==H?(T=a.jsx(te,{value:U.name,onChange:H,autoFocus:!0,placeholder:"Nome da Aba",className:"h-9 rounded-xl text-xs"}),t[11]=U.name,t[12]=H,t[13]=T):T=t[13];let D;t[14]!==M.name?(D=M.name&&a.jsx("p",{className:"text-[11px] text-rose-500",children:M.name}),t[14]=M.name,t[15]=D):D=t[15];let G;t[16]!==T||t[17]!==D?(G=a.jsx(d,{children:a.jsxs("div",{className:"space-y-1",children:[T,D]})}),t[16]=T,t[17]=D,t[18]=G):G=t[18];const Y=l.emendas_count??0;let P;t[19]!==Y?(P=a.jsx(d,{children:a.jsxs(bt,{variant:"secondary",className:"rounded-full bg-slate-100 text-[10px] font-bold text-slate-700",children:[Y," vinculada(s)"]})}),t[19]=Y,t[20]=P):P=t[20];let F;t[21]!==C||t[22]!==f?(F=a.jsx(B,{size:"sm",onClick:C,disabled:f,className:"rounded-xl h-8 px-3 text-xs font-bold",children:"Salvar"}),t[21]=C,t[22]=f,t[23]=F):F=t[23];let K;t[24]===Symbol.for("react.memo_cache_sentinel")?(K=a.jsx(B,{size:"sm",variant:"outline",onClick:()=>k(!1),className:"rounded-xl h-8 px-3 text-xs font-semibold",children:"Cancelar"}),t[24]=K):K=t[24];let O;t[25]!==F?(O=a.jsx(d,{className:"text-right",children:a.jsxs("div",{className:"flex justify-end gap-1.5",children:[F,K]})}),t[25]=F,t[26]=O):O=t[26];let Q;return t[27]!==P||t[28]!==O||t[29]!==L||t[30]!==G?(Q=a.jsxs(ae,{children:[L,G,P,O]}),t[27]=P,t[28]=O,t[29]=L,t[30]=G,t[31]=Q):Q=t[31],Q}let o;t[32]!==l.id?(o=a.jsxs(d,{className:"font-mono text-xs text-slate-400",children:["#",l.id]}),t[32]=l.id,t[33]=o):o=t[33];let u;t[34]!==l.name?(u=a.jsx(d,{className:"font-extrabold text-slate-900 dark:text-white",children:l.name}),t[34]=l.name,t[35]=u):u=t[35];const h=l.emendas_count??0;let j;t[36]!==h?(j=a.jsx(d,{children:a.jsxs(bt,{variant:"secondary",className:"rounded-full bg-blue-50 px-2.5 py-0.5 text-[10px] font-bold text-blue-700 dark:bg-blue-950/40 dark:text-blue-300",children:[h," vinculada(s)"]})}),t[36]=h,t[37]=j):j=t[37];let s;t[38]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(St,{asChild:!0,children:a.jsx(B,{variant:"ghost",size:"sm",className:"h-8 w-8 rounded-lg p-0 text-slate-600 hover:bg-slate-100 dar
1k:text-slate-300 dark:hover:bg-slate-800",children:a.jsx(Dt,{className:"h-4 w-4"})})}),t[38]=s):s=t[38];let y;t[39]===Symbol.for("react.memo_cache_sentinel")?(y=()=>k(!0),t[39]=y):y=t[39];let g;t[40]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsxs(ze,{onClick:y,className:"text-xs font-semibold cursor-pointer",children:[a.jsx(Pt,{className:"mr-2 h-3.5 w-3.5 text-slate-500"}),"Editar"]}),t[40]=g):g=t[40];let N;t[41]===Symbol.for("react.memo_cache_sentinel")?(N=()=>i(!0),t[41]=N):N=t[41];let A;t[42]===Symbol.for("react.memo_cache_sentinel")?(A=a.jsx(d,{className:"text-right",children:a.jsxs(wt,{children:[s,a.jsxs(Ct,{align:"end",className:"rounded-2xl shadow-xl",children:[g,a.jsxs(ze,{onClick:N,className:"text-xs font-semibold text-rose-600 focus:text-rose-700 cursor-pointer",children:[a.jsx(Ft,{className:"mr-2 h-3.5 w-3.5"}),"Excluir"]})]})]})}),t[42]=A):A=t[42];let b;t[43]!==o||t[44]!==u||t[45]!==j?(b=a.jsxs(ae,{className:"transition-colors hover:bg-slate-50/80 dark:hover:bg-slate-800/40",children:[o,u,j,A]}),t[43]=o,t[44]=u,t[45]=j,t[46]=b):b=t[46];let _;t[47]===Symbol.for("react.memo_cache_sentinel")?(_=a.jsx(ft,{className:"text-lg font-black text-slate-900 dark:text-white",children:"Excluir Aba"}),t[47]=_):_=t[47];let p;t[48]!==l.name?(p=a.jsx("strong",{children:l.name}),t[48]=l.name,t[49]=p):p=t[49];let v;t[50]!==l.emendas_count?(v=l.emendas_count?a.jsxs("span",{className:"block mt-2 font-bold text-amber-600",children:["Atenção: Existem ",l.emendas_count," emenda(s) vinculada(s) a esta aba."]}):null,t[50]=l.emendas_count,t[51]=v):v=t[51];let $;t[52]!==p||t[53]!==v?($=a.jsxs(ut,{children:[_,a.jsxs(pt,{className:"text-xs text-slate-500 pt-2",children:["Tem certeza que deseja excluir a aba ",p,"?",v]})]}),t[52]=p,t[53]=v,t[54]=$):$=t[54];let X;t[55]===Symbol.for("react.memo_cache_sentinel")?(X=a.jsx(B,{variant:"outline",className:"rounded-xl text-xs font-semibold",onClick:()=>i(!1),children:"Cancelar"}),t[55]=X):X=t[55];let W;t[56]!==E?(W=a.jsxs(jt,{className:"gap-2 pt-4",children:[X,a.jsx(B,{variant:"destructive",className:"rounded-xl text-xs font-bold",onClick:E,children:"Excluir Aba"})]}),t[56]=E,t[57]=W):W=t[57];let R;t[58]!==$||t[59]!==W?(R=a.jsxs(gt,{className:"max-w-md rounded-3xl p-6",children:[$,W]}),t[58]=$,t[59]=W,t[60]=R):R=t[60];let V;t[61]!==I||t[62]!==R?(V=a.jsx(Nt,{open:I,onOpenChange:i,children:R}),t[61]=I,t[62]=R,t[63]=V):V=t[63];let J;return t[64]!==b||t[65]!==V?(J=a.jsxs(a.Fragment,{children:[b,V]}),t[64]=b,t[65]=V,t[66]=J):J=t[66],J}function Jt(e){const t=_t.c(42),{abas:l}=e;let w;t[0]===Symbol.for("react.memo_cache_sentinel")?(w={name:""},t[0]=w):w=t[0];const{data:k,setData:I,post:i,processing:m,reset:U,errors:x}=yt(w);let z;t[1]!==i||t[2]!==U?(z=$=>{$.preventDefault(),i("/portal/admin/emendas-parlamentares/abas",{preserveScroll:!0,onSuccess:()=>U()})},t[1]=i,t[2]=U,t[3]=z):z=t[3];const f=z;let M;t[4]===Symbol.for("react.memo_cache_sentinel")?(M=a.jsxs("div",{className:"mb-4",children:[a.jsx("h3",{className:"text-base font-extrabold text-slate-900 dark:text-white",children:"Cadastrar Nova Aba"}),a.jsx("p",{className:"text-xs text-slate-500",children:"Crie abas personalizadas para agrupar e organizar as emendas parlamentares no portal da transparência."})]}),t[4]=M):M=t[4];let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(ee,{htmlFor:"aba_name",className:"text-xs font-bold",children:"Nome da Aba *"}),t[5]=c):c=t[5];let C;t[6]!==I?(C=$=>I("name",$.target.value),t[6]=I,t[7]=C):C=t[7];let n;t[8]!==k.name||t[9]!==C?(n=a.jsx(te,{id:"aba_name",value:k.name,onChange:C,placeholder:"Ex: Emendas Individuais, Emendas de Bancada, 2026...",className:"h-10 rounded-xl border-slate-200 text-xs"}),t[8]=k.name,t[9]=C,t[10]=n):n=t[10];let E;t[11]!==x.name?(E=x.name&&a.jsx("p",{className:"text-[11px] text-rose-500",children:x.name}),t[11]=x.name,t[12]=E):E=t[12];let o;t[13]!==n||t[14]!==E?(o=a.jsxs("div",{className:"flex-1 space-y-1.5",children:[c,n,E]}),t[13]=n,t[14]=E,t[15]=o):o=t[15];let u;t[16]!==k.name||t[17]!==m?(u=m||!k.name.trim(),t[16]=k.name,t[17]=m,t[18]=u):u=t[18];let h;t[19]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsx(Bt,{className:"mr-1.5 h-4 w-4"}),t[19]=h):h=t[19];let j;t[20]!==u?(j=a.jsxs(B,{type:"submit",disabled:u,className:"rounded-xl h-10 text-xs font-bold shadow-xs",children:[h,"Adicionar Aba"]}),t[20]=u,t[21]=j):j=t[21];let s;t[22]!==f||t[23]!==j||t[24]!==o?(s=a.jsxs("div",{className:"rounded-3xl border border-slate-200/80 bg-white p-6 shadow-xs dark:border-slate-800 dark:bg-slate-900",children:[M,a.jsxs("form",{onSubmit:f,className:"flex flex-col gap-4 sm:flex-row sm:items-end",children:[o,j]})]}),t[22]=f,t[23]=j,t[24]=o,t[25]=s):s=t[25];let y;t[26]!==l.length?(y=a.jsxs("h3",{className:"text-base font-extrabold text-slate-900 dark:text-white",children:["Abas Cadastradas (",l.length,")"]}),t[26]=l.length,t[27]=y):y=t[27];let g;t[28]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx("p",{className:"text-xs text-slate-500",children:"Estrutura de agrupamento das emendas no portal"}),t[28]=g):g=t[28];let N;t[29]!==y?(N=a.jsx("div",{className:"flex items-center justify-between border-b border-slate-100 p-6 dark:border-slate-800",children:a.jsxs("div",{children:[y,g]})}),t[29]=y,t[30]=N):N=t[30];let A;t[31]===Symbol.for("react.memo_cache_sentinel")?(A=a.jsx(Et,{className:"bg-slate-50 dark:bg-slate-800/50",children:a.jsxs(ae,{className:"border-b border-slate-100 dar
1k:border-slate-800",children:[a.jsx(S,{className:"w-20 text-[11px] font-bold text-slate-500 uppercase",children:"ID"}),a.jsx(S,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Nome da Aba"}),a.jsx(S,{className:"w-48 text-[11px] font-bold text-slate-500 uppercase",children:"Emendas Vinculadas"}),a.jsx(S,{className:"w-24 text-right text-[11px] font-bold text-slate-500 uppercase",children:"Ações"})]})}),t[31]=A):A=t[31];let b;t[32]!==l?(b=l.length===0?a.jsx(ae,{children:a.jsx(d,{colSpan:4,className:"py-12 text-center text-slate-400",children:"Nenhuma aba cadastrada no momento."})}):l.map(Kt),t[32]=l,t[33]=b):b=t[33];let _;t[34]!==b?(_=a.jsx("div",{className:"overflow-x-auto",children:a.jsxs(At,{children:[A,a.jsx(Tt,{className:"divide-y divide-slate-100 dark:divide-slate-800 text-xs",children:b})]})}),t[34]=b,t[35]=_):_=t[35];let p;t[36]!==N||t[37]!==_?(p=a.jsxs("div",{className:"overflow-hidden rounded-3xl border border-slate-200/80 bg-white shadow-xs dark:border-slate-800 dark:bg-slate-900",children:[N,_]}),t[36]=N,t[37]=_,t[38]=p):p=t[38];let v;return t[39]!==s||t[40]!==p?(v=a.jsxs("div",{className:"space-y-6",children:[s,p]}),t[39]=s,t[40]=p,t[41]=v):v=t[41],v}function Kt(e){return a.jsx(Xt,{aba:e},e.id)}function ls(){const e=_t.c(164),{emendas:t,abas:l,filters:w,flash:k}=Mt().props;let I;e[0]!==l?(I=l===void 0?[]:l,e[0]=l,e[1]=I):I=e[1];const i=I,[m,U]=q.useState(w.aba_id??""),[x,z]=q.useState(w.autor_emenda??""),[f,M]=q.useState(w.cod_emenda??""),[c,C]=q.useState(w.ano??""),[n,E]=q.useState(w.type??""),[o,u]=q.useState(w.partido??""),[h,j]=q.useState(w.beneficiario??""),[s,y]=q.useState(null),[g,N]=q.useState(null);let A;e:{if(!s){let nt;e[2]===Symbol.for("react.memo_cache_sentinel")?(nt=[],e[2]=nt):nt=e[2],A=nt;break e}let r;e[3]!==s.ato_normativo_anexo?(r={label:"Ato Normativo",path:s.ato_normativo_anexo},e[3]=s.ato_normativo_anexo,e[4]=r):r=e[4];let Be;e[5]!==s.cronograma_execucao_anexo?(Be={label:"Cronograma de Execução",path:s.cronograma_execucao_anexo},e[5]=s.cronograma_execucao_anexo,e[6]=Be):Be=e[6];let Ie;e[7]!==s.plano_trabalho_anexo?(Ie={label:"Plano de Trabalho",path:s.plano_trabalho_anexo},e[7]=s.plano_trabalho_anexo,e[8]=Ie):Ie=e[8];let Me;e[9]!==s.execucao_despesas?(Me={label:"Execução de Despesas",path:s.execucao_despesas},e[9]=s.execucao_despesas,e[10]=Me):Me=e[10];let ot;e[11]!==r||e[12]!==Be||e[13]!==Ie||e[14]!==Me?(ot=[r,Be,Ie,Me].filter(ra),e[11]=r,e[12]=Be,e[13]=Ie,e[14]=Me,e[15]=ot):ot=e[15],A=ot}const b=A;let _;e[16]!==m||e[17]!==c||e[18]!==x||e[19]!==h||e[20]!==f||e[21]!==o||e[22]!==n?(_=()=>{$e.get("/portal/admin/emendas-parlamentares",{aba_id:m||void 0,autor_emenda:x||void 0,cod_emenda:f||void 0,ano:c||void 0,type:n||void 0,partido:o||void 0,beneficiario:h||void 0},{preserveState:!0,replace:!0})},e[16]=m,e[17]=c,e[18]=x,e[19]=h,e[20]=f,e[21]=o,e[22]=n,e[23]=_):_=e[23];const p=_;let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{U(""),z(""),M(""),C(""),E(""),u(""),j(""),$e.get("/portal/admin/emendas-parlamentares")},e[24]=v):v=e[24];const $=v;let X;e[25]!==g?(X=()=>{g&&$e.delete(`/portal/admin/emendas-parlamentares/${g.id}`,{onSuccess:()=>N(null)})},e[25]=g,e[26]=X):X=e[26];const W=X,R=k?.success||k?.message_success,V=k?.error||k?.message_error;let J;e[27]===Symbol.for("react.memo_cache_sentinel")?(J=a.jsx($t,{title:"Emendas Parlamentares - Admin"}),e[27]=J):J=e[27];let L;e[28]===Symbol.for("react.memo_cache_sentinel")?(L=a.jsxs("div",{children:[a.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:[a.jsx(Gt,{className:"h-3.5 w-3.5"}),a.jsx("span",{children:"Transparência ⢠Recursos Parlamentares"})]}),a.jsx("h1",{className:"mt-2 text-2xl font-black tracking-tight text-slate-900 dark:text-white sm:text-3xl",children:"Emendas Parlamentares"}),a.jsx("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400 sm:text-sm",children:"Gerencie emendas parlamentares, categorias/abas e seus anexos oficiais."})]}),e[28]=L):L=e[28];let H;e[29]===Symbol.for("react.memo_cache_sentinel")?(H=a.jsxs("div",{className:"flex flex-col justify-between gap-4 md:flex-row md:items-center",children:[L,a.jsxs(B,{onClick:la,className:"rounded-xl text-xs font-bold shadow-md transition hover:scale-105",children:[a.jsx(Bt,{className:"mr-1.5 h-4 w-4"}),"Nova Emenda"]}
1)]}),e[29]=H):H=e[29];let T;e[30]!==R?(T=R&&a.jsx("div",{className:"rounded-2xl border border-emerald-200 bg-emerald-50 p-4 text-xs font-semibold text-emerald-900 dark:border-emerald-900/50 dark:bg-emerald-950/40 dark:text-emerald-300",children:R}),e[30]=R,e[31]=T):T=e[31];let D;e[32]!==V?(D=V&&a.jsx("div",{className:"rounded-2xl border border-rose-200 bg-rose-50 p-4 text-xs font-semibold text-rose-900 dark:border-rose-900/50 dark:bg-rose-950/40 dark:text-rose-300",children:V}),e[32]=V,e[33]=D):D=e[33];let G;e[34]===Symbol.for("react.memo_cache_sentinel")?(G=a.jsxs(vt,{value:"emendas",className:"rounded-xl text-xs font-bold data-[state=active]:bg-white data-[state=active]:shadow-xs dark:data-[state=active]:bg-slate-900",children:[a.jsx(It,{className:"mr-1.5 h-3.5 w-3.5"}),"Emendas Parlamentares"]}),e[34]=G):G=e[34];let Y;e[35]===Symbol.for("react.memo_cache_sentinel")?(Y=a.jsx(Ot,{className:"mr-1.5 h-3.5 w-3.5"}),e[35]=Y):Y=e[35];let P;e[36]!==i.length?(P=i.length>0&&a.jsx("span",{className:"ml-1.5 rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-bold text-blue-700 dark:bg-blue-900/40 dark:text-blue-300",children:i.length}),e[36]=i.length,e[37]=P):P=e[37];let F;e[38]!==P?(F=a.jsxs(Rt,{className:"rounded-2xl bg-slate-100 p-1 dark:bg-slate-800",children:[G,a.jsxs(vt,{value:"abas",className:"rounded-xl text-xs font-bold data-[state=active]:bg-white data-[state=active]:shadow-xs dark:data-[state=active]:bg-slate-900",children:[Y,"Abas das Emendas",P]})]}),e[38]=P,e[39]=F):F=e[39];let K;e[40]===Symbol.for("react.memo_cache_sentinel")?(K=a.jsx(ee,{htmlFor:"aba_id",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Aba"}),e[40]=K):K=e[40];let O;e[41]===Symbol.for("react.memo_cache_sentinel")?(O=r=>U(r.target.value),e[41]=O):O=e[41];let Q;e[42]===Symbol.for("react.memo_cache_sentinel")?(Q=a.jsx("option",{value:"",children:"Todas as Abas"}),e[42]=Q):Q=e[42];let Z;e[43]!==i?(Z=i.map(sa),e[43]=i,e[44]=Z):Z=e[44];let se;e[45]!==m||e[46]!==Z?(se=a.jsxs("div",{className:"space-y-1.5",children:[K,a.jsxs("select",{id:"aba_id",value:m,onChange:O,className:"h-10 w-full rounded-xl border border-slate-200 bg-slate-50 px-3 text-xs font-semibold text-slate-700 shadow-xs focus:outline-none dark:border-slate-800 dark:bg-slate-800 dark:text-slate-200",children:[Q,Z]})]}),e[45]=m,e[46]=Z,e[47]=se):se=e[47];let Re;e[48]===Symbol.for("react.memo_cache_sentinel")?(Re=a.jsx(ee,{htmlFor:"autor_emenda",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Autor"}),e[48]=Re):Re=e[48];let Ve;e[49]===Symbol.for("react.memo_cache_sentinel")?(Ve=r=>z(r.target.value),e[49]=Ve):Ve=e[49];let le;e[50]!==x?(le=a.jsxs("div",{className:"space-y-1.5",children:[Re,a.jsx(te,{id:"autor_emenda",value:x,onChange:Ve,placeholder:"Nome do parlamentar...",className:"h-10 rounded-xl border-slate-200 bg-slate-50 text-xs shadow-xs dark:border-slate-800 dark:bg-slate-800"})]}),e[50]=x,e[51]=le):le=e[51];let Le;e[52]===Symbol.for("react.memo_cache_sentinel")?(Le=a.jsx(ee,{htmlFor:"cod_emenda",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Código"}),e[52]=Le):Le=e[52];let He;e[53]===Symbol.for("react.memo_cache_sentinel")?(He=r=>M(r.target.value),e[53]=He):He=e[53];let re;e[54]!==f?(re=a.jsxs("div",{className:"space-y-1.5",children:[Le,a.jsx(te,{id:"cod_emenda",value:f,onChange:He,placeholder:"Ex: 2026/001",className:"h-10 rounded-xl border-slate-200 bg-slate-50 text-xs shadow-xs dark:border-slate-800 dark:bg-slate-800"})]}),e[54]=f,e[55]=re):re=e[55];let Ge;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ge=a.jsx(ee,{htmlFor:"ano",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Ano"}),e[56]=Ge):Ge=e[56];let Oe;e[57]===Symbol.for("react.memo_cache_sentinel")?(Oe=r=>C(r.target.value.replace(/\D/g,"").slice(0,4)),e[57]=Oe):Oe=e[57];let oe;e[58]!==c?(oe=a.jsxs("div",{className:"space-y-1.5",children:[Ge,a.jsx(te,{id:"ano",value:c,onChange:Oe,placeholder:"Ex: 2026",className:"h-10 rounded-xl border-slate-200 bg-slate-50 text-xs shadow-xs dark:border-slate-800 dark:bg-slate-800"})]}),e[58]=c,e[59]=oe):oe=e[59];let qe;e[60]===Symbol.for("react.memo_cache_sentinel")?(qe=a.jsx(ee,{htmlFor:"type",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Tipo"}),e[60]=qe):qe=e[60];let Ue;e[61]===Symbol.for("react.memo_cache_sentinel")?(Ue=r=>E(r.target.value),e[61]=Ue):Ue=e[61];let ne;e[62]!==n?(ne=a.jsxs("div",{className:"space-y-1.5",children:[qe,a.jsx(te,{id:"type",value:n,onChange:Ue,placeholder:"Individual, Bancada...",className:"h-10 rounded-xl border-slate-200 bg-slate-50 text-xs shadow-xs dark:border-slate-800 dark:bg-slate-800"})]}),e[62]=n,e[63]=ne):ne=e[63];let We;e[64]===Symbol.for("react.memo_cache_sentinel")?(We=a.jsx(ee,{htmlFor:"partido",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Partido"}),e[64]=We):We=e[64];let Xe;e[65]===Symbol.for("react.memo_cache_sentinel")?(Xe=r=>u(r.target.value),e[65]=Xe):Xe=e[65];let de;e[66]!==o?(de=a.jsxs("div",{className:"space-y-1.5",children:[We,a.jsx(te,{id:"partido",value:o,onChange:Xe,placeholder:"Sigla do partido",className:"h-10 rounded-xl border-slate-200 bg-slate-50 text-xs shadow-xs dark:border-slate-800 dark:bg-slate-800"})]}),e[66]=o,e[67]=de):de=e[67];let Je;e[68]===Symbol.for("react.memo_cache_sentinel")?(Je=a.jsx(ee,{htmlFor:"beneficiario",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Beneficiário"}),e[68]=Je):Je=e[68];let Ke;e[69]===Symbol.for("react.memo_cache_sentinel")?(Ke=r=>j(r.target.value),e[69]=Ke):Ke=e[69];let ie;e[70]!==h?(ie=a.jsxs("div",{className:"space-y-1.5",children:[Je,a.jsx(te,{id:"benef
1iciario",value:h,onChange:Ke,placeholder:"Entidade / MunicÃpio",className:"h-10 rounded-xl border-slate-200 bg-slate-50 text-xs shadow-xs dark:border-slate-800 dark:bg-slate-800"})]}),e[70]=h,e[71]=ie):ie=e[71];let Qe;e[72]===Symbol.for("react.memo_cache_sentinel")?(Qe=a.jsx(qt,{className:"mr-1.5 h-3.5 w-3.5"}),e[72]=Qe):Qe=e[72];let ce;e[73]!==p?(ce=a.jsxs(B,{onClick:p,className:"rounded-xl h-10 text-xs font-bold shadow-xs",children:[Qe,"Buscar"]}),e[73]=p,e[74]=ce):ce=e[74];let me;e[75]!==m||e[76]!==c||e[77]!==x||e[78]!==h||e[79]!==f||e[80]!==o||e[81]!==n?(me=(m||x||f||c||n||o||h)&&a.jsxs(B,{variant:"outline",onClick:$,className:"rounded-xl h-10 text-xs font-semibold",children:[a.jsx(Ut,{className:"mr-1.5 h-3.5 w-3.5"}),"Limpar"]}),e[75]=m,e[76]=c,e[77]=x,e[78]=h,e[79]=f,e[80]=o,e[81]=n,e[82]=me):me=e[82];let xe;e[83]!==ce||e[84]!==me?(xe=a.jsxs("div",{className:"flex items-end gap-2",children:[ce,me]}),e[83]=ce,e[84]=me,e[85]=xe):xe=e[85];let he;e[86]!==se||e[87]!==le||e[88]!==re||e[89]!==oe||e[90]!==ne||e[91]!==de||e[92]!==ie||e[93]!==xe?(he=a.jsx("div",{className:"rounded-3xl border border-slate-200/80 bg-white p-6 shadow-xs dark:border-slate-800 dark:bg-slate-900",children:a.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4",children:[se,le,re,oe,ne,de,ie,xe]})}),e[86]=se,e[87]=le,e[88]=re,e[89]=oe,e[90]=ne,e[91]=de,e[92]=ie,e[93]=xe,e[94]=he):he=e[94];let Ye;e[95]===Symbol.for("react.memo_cache_sentinel")?(Ye=a.jsx("h3",{className:"text-base font-extrabold text-slate-900 dark:text-white",children:"Emendas Cadastradas"}),e[95]=Ye):Ye=e[95];let be;e[96]!==t.total?(be=a.jsx("div",{className:"flex items-center justify-between border-b border-slate-100 p-6 dark:border-slate-800",children:a.jsxs("div",{children:[Ye,a.jsxs("p",{className:"text-xs text-slate-500",children:["Total de ",t.total," emendas registradas"]})]})}),e[96]=t.total,e[97]=be):be=e[97];let Ze;e[98]===Symbol.for("react.memo_cache_sentinel")?(Ze=a.jsx(Et,{className:"bg-slate-50 dark:bg-slate-800/50",children:a.jsxs(ae,{className:"border-b border-slate-100 dark:border-slate-800",children:[a.jsx(S,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Aba"}),a.jsx(S,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Autor"}),a.jsx(S,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Código"}),a.jsx(S,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Ano"}),a.jsx(S,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Tipo"}),a.jsx(S,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Partido"}),a.jsx(S,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Beneficiário"}),a.jsx(S,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Valor Emenda"}),a.jsx(S,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Valor Pago"}),a.jsx(S,{className:"text-right text-[11px] font-bold text-slate-500 uppercase",children:"Ações"})]})}),e[98]=Ze):Ze=e[98];let fe;e[99]!==t.data?(fe=t.data.length===0?a.jsx(ae,{children:a.jsx(d,{colSpan:10,className:"py-12 text-center text-slate-400",children:"Nenhuma emenda parlamentar encontrada."})}):t.data.map(r=>a.jsxs(ae,{className:"transition-colors hover:bg-slate-50/80 dark:hover:bg-slate-800/40",children:[a.jsx(d,{children:r.abas&&r.abas.length>0?a.jsx("div",{className:"flex flex-wrap gap-1",children:r.abas.map(aa)}):a.jsx("span",{className:"text-[11px] text-slate-400 font-medium",children:"Geral"})}),a.jsx(d,{className:"font-extrabold text-slate-900 dark:text-white",children:r.autor_emenda??"â"}),a.jsx(d,{className:"font-mono text-slate-500",children:r.cod_emenda??"â"}),a.jsx(d,{className:"text-slate-600 font-medium",children:r.ano??"â"}),a.jsx(d,{className:"text-slate-600 font-medium",children:r.type??"â"}),a.jsx(d,{className:"text-slate-600 font-medium",children:r.partido??"â"}),a.jsx(d,{className:"text-slate-600 font-medium",children:r.beneficiario??"â"}),a.jsx(d,{className:"font-extrabold text-emerald-600 dark:text-emerald-400",children:dt(r.valor_emenda)}),a.jsx(d,{className:"font-extrabold text-slate-700 dark:text-slate-300",children:dt(r.valor_pago)}),a.jsx(d,{className:"text-right",children:a.jsxs(wt,{children:[a.jsx(St,{asChild:!0,children:a.jsx(B,{variant:"ghost",size:"sm",className:"h-8 w-8 rounded-lg p-0 text-slate-600 hover:bg-slate-100 dar
1k:text-slate-300 dark:hover:bg-slate-800",children:a.jsx(Dt,{className:"h-4 w-4"})})}),a.jsxs(Ct,{align:"end",className:"rounded-2xl shadow-xl",children:[a.jsxs(ze,{onClick:()=>y(r),className:"text-xs font-semibold cursor-pointer",children:[a.jsx(Ht,{className:"mr-2 h-3.5 w-3.5 text-slate-500"}),"Ver detalhes"]}),a.jsxs(ze,{onClick:()=>$e.get(`/portal/admin/emendas-parlamentares/${r.id}/edit`),className:"text-xs font-semibold cursor-pointer",children:[a.jsx(Pt,{className:"mr-2 h-3.5 w-3.5 text-slate-500"}),"Editar"]}),a.jsxs(ze,{onClick:()=>N(r),className:"text-xs font-semibold text-rose-600 focus:text-rose-700 cursor-pointer",children:[a.jsx(Ft,{className:"mr-2 h-3.5 w-3.5"}),"Excluir"]})]})]})})]},r.id)),e[99]=t.data,e[100]=fe):fe=e[100];let pe;e[101]!==fe?(pe=a.jsx("div",{className:"overflow-x-auto",children:a.jsxs(At,{children:[Ze,a.jsx(Tt,{className:"divide-y divide-slate-100 dark:divide-slate-800 text-xs",children:fe})]})}),e[101]=fe,e[102]=pe):pe=e[102];let ue;e[103]!==t.current_page||e[104]!==t.last_page||e[105]!==t.links||e[106]!==t.per_page||e[107]!==t.total?(ue=a.jsx("div",{className:"p-4 border-t border-slate-100 dark:border-slate-800",children:a.jsx(zt,{current_page:t.current_page,last_page:t.last_page,per_page:t.per_page,total:t.total,links:t.links,baseUrl:"/portal/admin/emendas-parlamentares"})}),e[103]=t.current_page,e[104]=t.last_page,e[105]=t.links,e[106]=t.per_page,e[107]=t.total,e[108]=ue):ue=e[108];let je;e[109]!==be||e[110]!==pe||e[111]!==ue?(je=a.jsxs("div",{className:"overflow-hidden rounded-3xl border border-slate-200/80 bg-white shadow-xs dark:border-slate-800 dark:bg-slate-900",children:[be,pe,ue]}),e[109]=be,e[110]=pe,e[111]=ue,e[112]=je):je=e[112];let ge;e[113]!==he||e[114]!==je?(ge=a.jsxs(kt,{value:"emendas",className:"space-y-6",children:[he,je]}),e[113]=he,e[114]=je,e[115]=ge):ge=e[115];let Ne;e[116]!==i?(Ne=a.jsx(kt,{value:"abas",children:a.jsx(Jt,{abas:i})}),e[116]=i,e[117]=Ne):Ne=e[117];let _e;e[118]!==F||e[119]!==ge||e[120]!==Ne?(_e=a.jsxs(Vt,{defaultValue:"emendas",className:"space-y-6",children:[F,ge,Ne]}),e[118]=F,e[119]=ge,e[120]=Ne,e[121]=_e):_e=e[121];let ve;e[122]!==D||e[123]!==_e||e[124]!==T?(ve=a.jsxs("div",{className:"container mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8 space-y-6",children:[H,T,D,_e]}),e[122]=D,e[123]=_e,e[124]=T,e[125]=ve):ve=e[125];const it=!!s;let et;e[126]===Symbol.for("react.memo_cache_sentinel")?(et=()=>y(null),e[126]=et):et=e[126];const ct=s?.autor_emenda??"Emenda Parlamentar";let ke;e[127]!==ct?(ke=a.jsx(ft,{className:"text-lg font-black text-slate-900 dark:text-white",children:ct}),e[127]=ct,e[128]=ke):ke=e[128];const mt=s?.cod_emenda??"Sem código informado";let ye;e[129]!==s?(ye=s?.abas&&s.abas.length>0&&` ⢠Abas: ${s.abas.map(ta).join(", ")}`,e[129]=s,e[130]=ye):ye=e[130];let we;e[131]!==mt||e[132]!==ye?(we=a.jsxs(pt,{className:"text-xs text-slate-500 pt-1",children:[mt,ye]}),e[131]=mt,e[132]=ye,e[133]=we):we=e[133];let Se;e[134]!==ke||e[135]!==we?(Se=a.jsxs(ut,{children:[ke,we]}),e[134]=ke,e[135]=we,e[136]=Se):Se=e[136];let Ce;e[137]!==b||e[138]!==s?(Ce=s&&a.jsxs("div",{className:"mt-4 space-y-6",children:[a.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-slate-50/50 p-4 dark:border-slate-800 dark:bg-slate-900/50",children:[a.jsx("h4",{className:"text-xs font-bold uppercase tracking-wider text-slate-500 mb-3",children:"Informações Gerais"}),a.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3 text-xs",children:[["Abas",s.abas&&s.abas.length>0?s.abas.map(ea).join(", "):"Geral (Nenhuma)"],["Autor",s.autor_emenda],["Código da Emenda",s.cod_emenda],["Ano",s.ano],["Tipo",s.type],["Partido",s.partido],["Modalidade",s.modalidade],["Ato Normativo",s.ato_normativo],["Número do Processo",s.numero_processo]].map(Zt)})]}),a.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-slate-50/50 p-4 dark:border-slate-800 dark:bg-slate-900/50",children:[a.jsx("h4",{className:"text-xs font-bold uppercase tracking-wider text-slate-500 mb-3",children:"Execução e Identificação"}),a.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3 text-xs",children:[["Beneficiário",s.beneficiario],["Ãrgão Executor",s.orgao_executor],["Credor",s.credor],["MunicÃpio",s.municipio],["Forma de Repasse",s.forma_repasse]].map(Yt)})]}),a.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-slate-50/50 p-4 dark:border-slate-800 dark:bg-slate-900/50",children:[a.jsx("h4",{className:"text-xs font-bold uppercase tracking-wider text-slate-500 mb-3",children:"Valores Financeiros"}),a.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 text-xs",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-[11px] font-bold text-slate-400",children:"Valor da Emenda"}),a.jsx("p",{className:"mt-0.5 text-base font-black text-emerald-600 dark:text-emerald-400",children:dt(s.valor_emenda)})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[11px] font-bold text-slate-400",children:"Valor Pago"}),a.jsx("p",{className:"mt-0.5 text-base font-black text-slate-900 dark:text-white",children:dt(s.valor_pago)})]})]})]}),a.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-slate-50/50 p-4 dark:border-slate-800 dark:bg-slate-900/50",children:[a.jsx("h4",{className:"text-xs font-bold uppercase tracking-wider text-slate-500 mb-3",children:"Documentos e Anexos"}),b.length>0?a.jsx("div",{className:"flex flex-wrap gap-2.5",children:b.map(Qt)}):a.jsx("p",{className:"text-xs text-slate-400",children:"Nenhum documento anexo enviado para esta emenda."})]})]}),e[137]=b,e[138]=s,e[139]=Ce):Ce=e[139];let tt;e[140]===Symbol.for("react.memo_cache_sentinel")?(tt=a.jsx(jt,{className:"pt-4",children:a.jsx(B,{variant:"outline",className:"rounded-xl text-xs font-semibold",onClick:()=>y(null),children:"Fechar"})}),e[140]=tt):tt=e[140];let Ee;e[141]!==Se||e[142]!==Ce?(Ee=a.jsxs(gt,{className:"max-w-3xl max-h-[90vh] overflow-y-auto rounded-3xl p-6",children:[Se,Ce,tt]}),e[141]=Se,e[142]=Ce,e[143]=Ee):Ee=e[143];let Ae;
1e[144]!==it||e[145]!==Ee?(Ae=a.jsx(Nt,{open:it,onOpenChange:et,children:Ee}),e[144]=it,e[145]=Ee,e[146]=Ae):Ae=e[146];const xt=!!g;let at;e[147]===Symbol.for("react.memo_cache_sentinel")?(at=()=>N(null),e[147]=at):at=e[147];let st;e[148]===Symbol.for("react.memo_cache_sentinel")?(st=a.jsx(ft,{className:"text-lg font-black text-slate-900 dark:text-white",children:"Excluir Emenda Parlamentar"}),e[148]=st):st=e[148];const ht=g?.autor_emenda;let Te;e[149]!==ht?(Te=a.jsxs(ut,{children:[st,a.jsxs(pt,{className:"text-xs text-slate-500 pt-2",children:["Tem certeza que deseja excluir ",a.jsx("strong",{children:ht}),"? Os anexos vinculados também serão removidos."]})]}),e[149]=ht,e[150]=Te):Te=e[150];let lt;e[151]===Symbol.for("react.memo_cache_sentinel")?(lt=a.jsx(B,{variant:"outline",className:"rounded-xl text-xs font-semibold",onClick:()=>N(null),children:"Cancelar"}),e[151]=lt):lt=e[151];let De;e[152]!==W?(De=a.jsxs(jt,{className:"gap-2 pt-4",children:[lt,a.jsx(B,{variant:"destructive",className:"rounded-xl text-xs font-bold",onClick:W,children:"Excluir Emenda"})]}),e[152]=W,e[153]=De):De=e[153];let Pe;e[154]!==Te||e[155]!==De?(Pe=a.jsxs(gt,{className:"max-w-md rounded-3xl p-6",children:[Te,De]}),e[154]=Te,e[155]=De,e[156]=Pe):Pe=e[156];let Fe;e[157]!==xt||e[158]!==Pe?(Fe=a.jsx(Nt,{open:xt,onOpenChange:at,children:Pe}),e[157]=xt,e[158]=Pe,e[159]=Fe):Fe=e[159];let rt;return e[160]!==ve||e[161]!==Ae||e[162]!==Fe?(rt=a.jsxs(Lt,{children:[J,ve,Ae,Fe]}),e[160]=ve,e[161]=Ae,e[162]=Fe,e[163]=rt):rt=e[163],rt}function Qt(e){return a.jsxs("a",{href:Wt(e.path)??"#",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border border-slate-200/80 bg-white px-3 py-2 text-xs font-bold text-blue-600 shadow-xs hover:bg-slate-50 dark:border-slate-800 dark:bg-slate-800 dark:text-blue-400",children:[a.jsx(It,{className:"h-4 w-4"}),a.jsx("span",{children:e.label})]},e.label)}function Yt(e){const[t,l]=e;return a.jsxs("div",{children:[a.jsx("p",{className:"text-[11px] font-bold text-slate-400",children:t}),a.jsx("p",{className:"mt-0.5 font-bold text-slate-800 dark:text-slate-200",children:l||"â"})]},String(t))}function Zt(e){const[t,l]=e;return a.jsxs("div",{children:[a.jsx("p",{className:"text-[11px] font-bold text-slate-400",children:t}),a.jsx("p",{className:"mt-0.5 font-bold text-slate-800 dark:text-slate-200",children:l||"â"})]},String(t))}function ea(e){return e.name}function ta(e){return e.name}function aa(e){return a.jsx(bt,{variant:"secondary",className:"rounded-full bg-blue-50 px-2 py-0.5 text-[10px] font-bold text-blue-700 dark:bg-blue-950/40 dark:text-blue-300",children:e.name},e.id)}function sa(e){return a.jsx("option",{value:e.id,children:e.name},e.id)}function la(){return $e.get("/portal/admin/emendas-parlamentares/create")}function ra(e){return e.path}export{ls 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.