1import{c as fe,u as be,r as oe,j as t,b as R,H as ue}from"./app-CTaY8UJf.js";import{P as ge}from"./PaginationFixed-iLESiNIA.js";import{B as je}from"./badge-CwzmSl53.js";import{B as C}from"./button-DXCKLHtj.js";import{D as Ne,b as ve,a as ke,c as _e,d as ye,e as we}from"./dialog-BKzHwCpL.js";import{D as Se,a as De,b as Te,c as ie}from"./dropdown-menu-D6OZoFra.js";import{I as Ce}from"./input-7aHhCeCr.js";import{L as xe}from"./label-CxCrcTSv.js";import{T as de,a as E,b as Ee,c as $,d as Re,e as Ae}from"./table-Cb1Hol7G.js";import{A as $e}from"./AppLayoutWithNotifications-mus8tTbI.js";import Be from"./file-text-jraIksbC.js";import Fe from"./ellipsis-DmaWUrvi.js";import He from"./eye-BixEHFrD.js";import Ie from"./pencil-TRb729mG.js";import Oe from"./trash-2-QtamTJOn.js";import{R as Pe}from"./shield-check-CXJJ4XEh.js";import qe from"./plus-BsfGhhT4.js";import pe from"./search-BOJp92ky.js";import Le 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"./layers-Cb0hKdx0.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";const o="/admin/outras-receitas";function Lt(){const e=fe.c(81),{items:s,types:A,filters:ne,flash:B}=be().props,[l,ce]=oe.useState(ne.title??""),[r,me]=oe.useState(ne.type??""),[i,F]=oe.useState(null),H=B?.message_success??B?.success,I=B?.message_error??B?.error;let O;e[0]!==l||e[1]!==r?(O=()=>{R.get(o,{title:l||void 0,type:r||void 0},{preserveState:!0,replace:!0})},e[0]=l,e[1]=r,e[2]=O):O=e[2];const d=O;let P;e[3]===Symbol.for("react.memo_cache_sentinel")?(P=()=>{ce(""),me(""),R.get(o)},e[3]=P):P=e[3];const he=P;let q;e[4]!==i?(q=()=>{i&&R.delete(`${o}/${i.id}`,{onSuccess:()=>F(null)})},e[4]=i,e[5]=q):q=e[5];const ae=q;let L;e[6]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(ue,{title:"DÃvida Ativa e Outras Receitas - Admin"}),e[6]=L):L=e[6];let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=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(Pe,{className:"h-3.5 w-3.5"}),t.jsx("span",{children:"Transparência ⢠Receitas"})]}),t.jsx("h1",{className:"mt-2 text-2xl font-black tracking-tight text-slate-900 dark:text-white sm:text-3xl",children:"DÃvida Ativa e Outras Receitas"}),t.jsx("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400 sm:text-sm",children:"Gerencie demonstrativos de dÃvida ativa, cobranças e receitas extraordinárias."})]}),e[7]=M):M=e[7];let z;e[8]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsxs("div",{className:"flex flex-col justify-between gap-4 md:flex-row md:items-center",children:[M,t.jsxs(C,{onClick:ze,className:"rounded-xl text-xs font-bold shadow-md transition hover:scale-105",children:[t.jsx(qe,{className:"mr-1.5 h-4 w-4"}),"Nova Receita"]})]}),e[8]=z):z=e[8];let n;e[9]!==H?(n=H&&t.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:H}),e[9]=H,e[10]=n):n=e[10];let c;e[11]!==I?(c=I&&t.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:I}),e[11]=I,e[12]=c):c=e[12];let G;e[13]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(xe,{htmlFor:"title",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Buscar por TÃtulo"}),e[13]=G):G=e[13];let K;e[14]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(pe,{className:"absolute top-1/2 left-3 h-3.5 w-3.5 -translate-y-1/2 text-slate-400"}),e[14]=K):K=e[14];let U;e[15]===Symbol.for("react.memo_cache_sentinel")?(U=a=>ce(a.target.value),e[15]=U):U=e[15];let m;e[16]!==d?(m=a=>a.key==="Enter"&&d(),e[16]=d,e[17]=m):m=e[17];let x;e[18]!==m||e[19]!==l?(x=t.jsxs("div",{className:"space-y-1.5",children:[G,t.jsxs("div",{className:"relative",children:[K,t.jsx(Ce,{id:"title",placeholder:"Digite o nome do demonstrativo...",value:l,onCh
1ange:U,onKeyDown:m,className:"h-10 rounded-xl border-slate-200 bg-slate-50 pl-9 text-xs shadow-xs focus:bg-white dark:border-slate-800 dark:bg-slate-800"})]})]}),e[18]=m,e[19]=l,e[20]=x):x=e[20];let V;e[21]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(xe,{htmlFor:"type",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Classificação / Tipo"}),e[21]=V):V=e[21];let W;e[22]===Symbol.for("react.memo_cache_sentinel")?(W=a=>me(a.target.value),e[22]=W):W=e[22];let X;e[23]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx("option",{value:"",children:"Todos os tipos"}),e[23]=X):X=e[23];let p;e[24]!==A?(p=Object.entries(A).map(Me),e[24]=A,e[25]=p):p=e[25];let h;e[26]!==p||e[27]!==r?(h=t.jsxs("div",{className:"space-y-1.5",children:[V,t.jsxs("select",{id:"type",value:r,onChange:W,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:[X,p]})]}),e[26]=p,e[27]=r,e[28]=h):h=e[28];let J;e[29]===Symbol.for("react.memo_cache_sentinel")?(J=t.jsx(pe,{className:"mr-1.5 h-3.5 w-3.5"}),e[29]=J):J=e[29];let f;e[30]!==d?(f=t.jsxs(C,{onClick:d,className:"rounded-xl h-10 text-xs font-bold shadow-xs",children:[J,"Filtrar"]}),e[30]=d,e[31]=f):f=e[31];let b;e[32]!==l||e[33]!==r?(b=(l||r)&&t.jsxs(C,{variant:"outline",onClick:he,className:"rounded-xl h-10 text-xs font-semibold",children:[t.jsx(Le,{className:"mr-1.5 h-3.5 w-3.5"}),"Limpar"]}),e[32]=l,e[33]=r,e[34]=b):b=e[34];let u;e[35]!==f||e[36]!==b?(u=t.jsxs("div",{className:"flex items-end gap-2",children:[f,b]}),e[35]=f,e[36]=b,e[37]=u):u=e[37];let g;e[38]!==x||e[39]!==h||e[40]!==u?(g=t.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:t.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",children:[x,h,u]})}),e[38]=x,e[39]=h,e[40]=u,e[41]=g):g=e[41];let Q;e[42]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx("h3",{className:"text-base font-extrabold text-slate-900 dark:text-white",children:"Demonstrativos Cadastrados"}),e[42]=Q):Q=e[42];let j;e[43]!==s.total?(j=t.jsx("div",{className:"flex items-center justify-between border-b border-slate-100 p-6 dark:border-slate-800",children:t.jsxs("div",{children:[Q,t.jsxs("p",{className:"text-xs text-slate-500",children:["Total de ",s.total," registros encontrados"]})]})}),e[43]=s.total,e[44]=j):j=e[44];let Y;e[45]===Symbol.for("react.memo_cache_sentinel")?(Y=t.jsx(Ee,{className:"bg-slate-50 dark:bg-slate-800/50",children:t.jsxs(de,{className:"border-b border-slate-100 dark:border-slate-800",children:[t.jsx($,{className:"w-16 text-[11px] font-bold text-slate-500 uppercase",children:"ID"}),t.jsx($,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"TÃtulo do Documento"}),t.jsx($,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Tipo"}),t.jsx($,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Arquivo"}),t.jsx($,{className:"text-right text-[11px] font-bold text-slate-500 uppercase",children:"Ações"})]})}),e[45]=Y):Y=e[45];let N;e[46]!==s.data?(N=s.data.length===0?t.jsx(de,{children:t.jsx(E,{colSpan:5,className:"py-12 text-center text-slate-400",children:"Nenhum registro de outra receita encontrado."})}):s.data.map(a=>t.jsxs(de,{className:"transition-colors hover:bg-slate-50/80 dark:hover:bg-slate-800/40",children:[t.jsxs(E,{className:"font-mono text-slate-400 font-bold",children:["#",a.id]}),t.jsx(E,{className:"font-extrabold text-slate-900 dark:text-white",children:a.title}),t.jsx(E,{children:t.jsx(je,{variant:"secondary",className:"rounded-full bg-slate-100 px-2.5 py-0.5 text-[10px] font-bold text-slate-700 dark:bg-slate-800 dark:text-slate-300",children:a.type_label??a.type??"â"})}),t.jsx(E,{children:a.path_url?t.jsxs("a",{href:a.path_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border border-slate-200/80 bg-slate-50 px-3 py-1.5 text-xs font-bold text-blue-600 hover:bg-blue-50 dark:border-slate-800 dark:bg-slate-800 dark:text-blue-400",children:[t.jsx(Be,{className:"h-3.5 w-3.5"}),t.jsx("span",{children:"Abrir arquivo"})]}):t.jsx("span",{className:"text-slate-400",children:"â"})}),t.jsx(E,{className:"text-right",children:t.jsxs(Se,{children:[t.jsx(De,{asChild:!0,children:t.jsx(C,{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:t.jsx(Fe,{className:"h-4 w-4"})})}),t.jsxs(Te,{align:"end",className:"rounded-2xl shadow-xl",children:[t.jsxs(ie,{onClick:()=>R.get(`${o}/${a.id}`),className:"text-xs font-semibold cursor-pointer",children:[t.jsx(He,{className:"mr-2 h-3.5 w-3.5 text-slate-500"}),"Ver detalhes"]}),t.jsxs(ie,{onClick:()=>R.get(`${o}/${a.id}/edit`),className:"text-xs font-semibold cursor-pointer",children:[t.jsx(Ie,{className:"mr-2 h-3.5 w-3.5 text-slate-500"}),"Editar"]}),t.jsxs(ie,{onClick:()=>F(a),className:"text-xs font-semibold text-rose-600 focus:text-rose-700 cursor-pointer",children:[t.jsx(Oe,{className:"mr-2 h-3.5 w-3.5"}),"Excluir"]})]})]})})]},a.id)),e[46]=s.data,e[47]=N):N=e[47];let v;e[48]!==N?(v=t.jsx("div",{className:"overflow-x-auto",children:t.jsxs(Re,{children:[Y,t.jsx(Ae,{className:"divide-y divide-slate-100 dark:divide-slate-800 text-xs",children:N})]})}),e[48]=N,e[49]=v):v=e[49];let k;e[50]!==s.current_page||e[51]!==s.last_page||e[52]!==s.links||e[53]!==s.per_page||e[54]!==s.total?(k=t.jsx("div",{className:"p-4 border-t border-slate-100 dark:border-slate-800",children:t.jsx(ge,{current_page:s.current_page,last_page:s.last_page,per_page:s.per_page,total:s.total,links:s.links,baseUrl:o})}),e[50]=s.current_page,e[51]=s.last_page,e[52]=s.links,e[53]=s.per_page,e[54]=s.total,e[55]=k):k=e[55];let _;e[56]!==j||e[57]!==v||e[58]!==k?(_=t.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:[j,v,k]}),e[56]=j,e[57]=v,e[58]=k,e[59]=_):_=e[59];let y;e[60]!==g||e[61]!==_||e[62]!==n||e[63]!==c?(y=t.jsxs("div",{className:"container mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8 space-y-6",children:[z,n,c,g,_]}),e[60]=g,e[61]=_,e[62]=n,e[63]=c,e[64]=y):y=e[64];const le=!!i;let Z;e[65]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>F(null),e[65]=Z):Z=e[65];let ee;e[66]===Symbol.for("react.memo_cache_sentinel")?(ee=t.jsx(Ne,{className:"text-lg font-black text-slate-900 dark:text-white",children:"Excluir Registro"}),e[66]=ee):ee=e[66];const re=i?.title;let w;e[67]!==re?(w=t.jsxs(ve,{children:[ee,t.jsxs(ke,{className:"text-xs text-slate-500 pt-2",children:["Tem certeza que deseja excluir ",t.jsx("strong",{children:re}),"? Esta ação removerá o arquivo permanentemente."]})]}),e[67]=re,e[68]=w):w=e[68];let te;e[69]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx(C,{variant:"outline",className:"rounded-xl text-xs font-semibold",onClick:()=>F(null),children:"Cancelar"}),e[69]=te):te=e[69];let S;e[70]!==ae?(S=t.jsxs(_e,{className:"gap-2 pt-4",children:[te,t.jsx(C,{variant:"destructive",className:"rounded-xl text-xs font-bold",onClick:ae,children:"Excluir Registro"})]}),e[70]=ae,e[71]=S):S=e[71];let D;e[72]!==w||e[73]!==S?(D=t.jsxs(ye,{className:"max-w-md rounded-3xl p-6",children:[w,S]}),e[72]=w,e[73]=S,e[74]=D):D=e[74];let T;e[75]!==le||e[76]!==D?(T=t.jsx(we,{open:le,onOpenChange:Z,children:D}),e[75]=le,e[76]=D,e[77]=T):T=e[77];let se;return e[78]!==y||e[79]!==T?(se=t.jsxs($e,{children:[L,y,T]}),e[78]=y,e[79]=T,e[80]=se):se=e[80],se}function Me(e){const[s,A]=e;return t.jsx("option",{value:s,children:A},s)}function ze(){return R.get(`${o}/create`)}export{Lt 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.