1import{c as te,a as le,j as t}from"./app-CTaY8UJf.js";import{B as Y}from"./button-DXCKLHtj.js";import{C as oe,a as ae,b as se,c as ie}from"./card-UxP9oPxk.js";import{C as re}from"./currency-input-SUW_Z-3x.js";import{I as Z}from"./input-7aHhCeCr.js";import{L as H}from"./label-CxCrcTSv.js";import{S as me,b as ce,c as ne,a as de,d as pe}from"./select-BBMYAKnd.js";import{s as ue}from"./siapTypes-BZnwN-5y.js";import"./app-CNmQMdEi.js";import"./index-fQ3brVpV.js";import"./index-CsfSsVkk.js";import"./index-DXg2b8Vm.js";import"./index-CJBlix5Q.js";import"./index-DHUBBKJC.js";import"./index-ClkQdPrn.js";import"./index-BE_AIKwc.js";import"./chevron-down-COTwZrVV.js";import"./createLucideIcon-CmjF8lT1.js";import"./check-COSJjDXC.js";import"./chevron-up-dKr-3op1.js";function we(g){const e=te.c(75),{item:a,siapEmpenhoId:G,isEdit:X}=g,T=X===void 0?!1:X,J=a?.Numero??"";let r;e[0]!==a?(r=a?.Data?String(a.Data).slice(0,10):"",e[0]=a,e[1]=r):r=e[1];const K=a?.TipoDocumento??"",M=a?.Valor??"",O=T?"put":"post";let F;e[2]!==J||e[3]!==r||e[4]!==K||e[5]!==M||e[6]!==O?(F={Numero:J,Data:r,TipoDocumento:K,Valor:M,_method:O},e[2]=J,e[3]=r,e[4]=K,e[5]=M,e[6]=O,e[7]=F):F=e[7];const{data:s,setData:o,post:P,processing:E,errors:l}=le(F);let I;e[8]!==T||e[9]!==a||e[10]!==P||e[11]!==G?(I=i=>{i.preventDefault();const ee=T&&a?.id?`/portal/admin/siap-empenho/liquidacoes/${a.id}`:`/portal/admin/siap-empenho/${G}/liquidacoes`;P(ee)},e[8]=T,e[9]=a,e[10]=P,e[11]=G,e[12]=I):I=e[12];const Q=I;let q;e[13]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx(oe,{children:t.jsx(ae,{children:"Dados da Liquidação"})}),e[13]=q):q=e[13];let L;e[14]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(H,{htmlFor:"Numero",children:"Número *"}),e[14]=L):L=e[14];let m;e[15]!==o?(m=i=>o("Numero",i.target.value),e[15]=o,e[16]=m):m=e[16];let c;e[17]!==s.Numero||e[18]!==m?(c=t.jsx(Z,{id:"Numero",value:s.Numero,onChange:m}),e[17]=s.Numero,e[18]=m,e[19]=c):c=e[19];let n;e[20]!==l.Numero?(n=l.Numero&&t.jsx("p",{className:"text-sm text-red-600",children:l.Numero}),e[20]=l.Numero,e[21]=n):n=e[21];let d;e[22]!==c||e[23]!==n?(d=t.jsxs("div",{className:"space-y-2",children:[L,c,n]}),e[22]=c,e[23]=n,e[24]=d):d=e[24];let $;e[25]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(H,{htmlFor:"Data",children:"Data *"}),e[25]=$):$=e[25];let p;e[26]!==o?(p=i=>o("Data",i.target.value),e[26]=o,e[27]=p):p=e[27];let u;e[28]!==s.Data||e[29]!==p?(u=t.jsx(Z,{id:"Data",type:"date",value:s.Data,onChange:p}),e[28]=s.Data,e[29]=p,e[30]=u):u=e[30];let f;e[31]!==l.Data?(f=l.Data&&t.jsx("p",{className:"text-sm text-red-600",children:l.Data}),e[31]=l.Data,e[32]=f):f=e[32];let h;e[33]!==u||e[34]!==f?(h=t.jsxs("div",{className:"space-y-2",children:[$,u,f]}),e[33]=u,e[34]=f,e[35]=h):h=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(H,{htmlFor:"TipoDocumento",children:"Tipo de Documento *"}),e[36]=k):k=e[36];const U=s.TipoDocumento||"";let x;e[37]!==o?(x=i=>o("TipoDocumento",i),e[37]=o,e[38]=x):x=e[38];let w;e[39]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(ce,{id:"TipoDocumento",children:t.jsx(ne,{placeholder:"Selecionar tipo..."})}),e[39]=w):w=e[39];let B;e[40]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(me,{children:ue.TipoDocumento.map(he)}),e[40]=B):B=e[40];let j;e[41]!==U||e[42]!==x?(j=t.jsxs(de,{defaultValue:U,onValueChange:x,children:[w,B]}),e[41]=U,e[42]=x,e[43]=j):j=e[43];let D;e[44]!==l.TipoDocumento?(D=l.TipoDocumento&&t.jsx("p",{className:"text-sm text-red-600",children:l.TipoDocumento}),e[44]=l.TipoDocumento,e[45]=D):D=e[45];let N;e[46]!==j||e[47]!==D?(N=t.jsxs("div",{className:"space-y-2",children:[k,j,D]}),e[46]=j,e[47]=D,e[48]=N):N=e[48];let R;e[49]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(H,{htmlFor:"Valor",children:"Valor *"}),e[49]=R):R=e[49];let y;e[50]!==o?(y=i=>o("Valor",i),e[50]=o,e[51]=y):y=e[51];let S;e[52]!==s.Valor||e[53]!==y?(S=t.jsx(re,{id:"Valor",value:s.Valor,onChange:y}),e[52]=s.Valor,e[53]=y,e[54]=S):S=e[54];let _;e[55]!==l.Valor?(_=l.Valor&&t.jsx("p",{className:"text-sm text-red-600",children:l.Valor}),e[55]=l.Valor,e[56]=_):_=e[56];let b;e[57]!==S||e[58]!==_?(b=t.jsxs("div",{className:"space-y-2",children:[R,S,_]}),e[57]=S,e[58]=_,e[59]=b):b=e[59];let v;
1e[60]!==d||e[61]!==h||e[62]!==N||e[63]!==b?(v=t.jsxs(se,{children:[q,t.jsxs(ie,{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[d,h,N,b]})]}),e[60]=d,e[61]=h,e[62]=N,e[63]=b,e[64]=v):v=e[64];const W=E?"Salvando...":T?"Atualizar":"Cadastrar";let C;e[65]!==E||e[66]!==W?(C=t.jsx(Y,{type:"submit",disabled:E,children:W}),e[65]=E,e[66]=W,e[67]=C):C=e[67];let z;e[68]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(Y,{type:"button",variant:"outline",onClick:fe,children:"Cancelar"}),e[68]=z):z=e[68];let V;e[69]!==C?(V=t.jsxs("div",{className:"flex gap-3",children:[C,z]}),e[69]=C,e[70]=V):V=e[70];let A;return e[71]!==Q||e[72]!==v||e[73]!==V?(A=t.jsxs("form",{onSubmit:Q,className:"space-y-6",children:[v,V]}),e[71]=Q,e[72]=v,e[73]=V,e[74]=A):A=e[74],A}function fe(){return window.history.back()}function he(g){return t.jsx(pe,{value:g.value,children:g.label},g.value)}export{we 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.