1import{c as Oe,a as $e,r as we,j as t,H as Be,L as Ee}from"./app-CTaY8UJf.js";import{C as Re,a as Ae,b as Me,c as Pe}from"./card-UxP9oPxk.js";import{B as De}from"./button-DXCKLHtj.js";import{I as Y}from"./input-7aHhCeCr.js";import{L as i}from"./label-CxCrcTSv.js";import{S as qe,a as ze,b as Ge,c as Je,d as Ke}from"./select-BBMYAKnd.js";import{C as ke}from"./checkbox-BLf4wwbn.js";import{T as Qe}from"./textarea-0W-7qht9.js";import{A as Ue}from"./app-layout-DHg6PkRO.js";import We from"./save-tvu6uyS3.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";import"./index-Svmmcv6D.js";import"./index-sraz7nLe.js";import"./x-DmP7A1Bz.js";import"./video-CWkR2iFG.js";import"./chevron-right-Dcl2lTY9.js";import"./dropdown-menu-D6OZoFra.js";import"./index-msf3AG1t.js";import"./avatar-BRFzpAWX.js";import"./index-BGC6_Qsa.js";import"./index-C_SHgnPd.js";import"./layers-Cb0hKdx0.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"./search-BOJp92ky.js";import"./breadcrumbs-ByKSkPWt.js";function Jt(c){const e=Oe.c(139),{page_title:ge,page_description:_e,filters:m}=c,Ie=Ye;let Z;e[0]===Symbol.for("react.memo_cache_sentinel")?(Z=[],e[0]=Z):Z=e[0];let ee;e[1]===Symbol.for("react.memo_cache_sentinel")?(ee={tipo:Z,orgao:"",modalidade:"",data_hora:"",valor:"",status:"",vencedor:"",covid19:!1,objeto:""},e[1]=ee):ee=e[1];const{data:a,setData:l,post:be,processing:te,errors:s}=$e(ee),[ye,Ve]=we.useState("");let se;e[2]!==l?(se=o=>{const r=o.target.value.replace(/\D/g,"");Ve(Ie(r)),l("valor",r?(Number(r)/100).toFixed(2):"")},e[2]=l,e[3]=se):se=e[3];const Ne=se;let le;e[4]!==be?(le=o=>{o.preventDefault(),be("/portal/admin/contratos/store")},e[4]=be,e[5]=le):le=e[5];const Ce=le,Se=`Novo Contrato - ${ge}`;let d;e[6]!==Se?(d=t.jsx(Be,{title:Se}),e[6]=Se,e[7]=d):d=e[7];let ae;e[8]===Symbol.for("react.memo_cache_sentinel")?(ae=t.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Novo Contrato"}),e[8]=ae):ae=e[8];let n;e[9]!==_e?(n=t.jsx("div",{className:"flex items-center gap-4",children:t.jsxs("div",{children:[ae,t.jsx("p",{className:"mt-1 text-gray-600",children:_e})]})}),e[9]=_e,e[10]=n):n=e[10];let oe;e[11]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx(Re,{children:t.jsx(Ae,{children:"Informações do Contrato"})}),e[11]=oe):oe=e[11];let re;e[12]===Symbol.for("react.memo_cache_sentinel")?(re=t.jsx(i,{children:"Tipos (selecione um ou mais)"}),e[12]=re):re=e[12];let p;e[13]!==a.tipo||e[14]!==m.types||e[15]!==l?(p=t.jsx("div",{className:"grid grid-cols-2 gap-2 rounded-md border p-4",children:Object.entries(m.types).map(o=>{const[r,Le]=o;return t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(ke,{id:`tipo-${r}`,checked:a.tipo.includes(r),onCheckedChange:Te=>{Te?l("tipo",[...a.tipo,r]):l("tipo",a.tipo.filter(He=>He!==r))}}),t.jsx(i,{htmlFor:`tipo-${r}`,className:"text-sm font-normal cursor-pointer",children:Le})]},r)})}),e[13]=a.tipo,e[14]=m.types,e[15]=l,e[16]=p):p=e[16];let h;e[17]!==s.tipo?(h=s.tipo&&t.jsx("p",{className:"text-sm text-red-500",children:s.tipo}),e[17]=s.tipo,e[18]=h):h=e[18];let f;e[19]!==p||e[20]!==h?(f=t.jsxs("div",{className:"space-y-2 lg:col-span-2",children:[re,p,h]}),e[19]=p,e[20]=h,e[21]=f):f=e[21];let ie;e[22]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(i,{htmlFor:"orgao",children:"Ãrgão"}),e[22]=ie):ie=e[22];let x;e[23]!==l?(x=o=>l("orgao",o.target.value),e[23]=l,e[24]=x):x=e[24];let j;e[25]!==a.orgao||e[26]!==x?(j=t.jsx(Y,{id:"orgao",value:a.orgao,onChange:x,placeholder:""}),e[25]=a.orgao,e[26]=x,e[27]=j):j=e[27];let u;e[28]!==s.orgao?(u=s.orgao&&t.jsx("p",{className:"text-sm text-red-500",children:s.orgao}),e[28]=s.orgao,e[29]=u):u=e[29];let v;e[30]!==j||e[31]!==u?(v=t.jsxs("div",{className:"space-y-2",children:[ie,j,u]}),e[30]=j,e[31]=u,e[32]=v):v=e[32];let ce;e[33]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx(i,{htmlFor:"modalidade",children:"Modalidade"}),e[33]=ce):ce=e[33];let g;e[34]!==l?(g=o=>l("modalidade",o.target.value),e[34]=l,e[35]=g):g=e[35];let _;e[36]!==a.modalidade||e[37]!==g?(_=t.jsx(Y,{id:"modalidade",value:a.modalidade,onChange:g,placeholder:""}),e[36]=a.modalidade,e[37]=g,e[38]=_):_=e[38];let b;e[39]!==s.modalidade?(b=s.modalidade&&t.jsx("p",{className:"text-sm text-red-500",children:s.modalidade}),e[39]=s.modalidade,e[40]=b):b=e[40];let y;e[41]!==_||e[42]!==b?(y=t.jsxs("div",{className:"space-y-2",children:[ce,_,b]}),e[41]=_,e[42]=b,e[43]=y):y=e[43];let me;e[44]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(i,{htmlFor:"data_hora",children:"Data/Hora"}),e[44]=me):me=e[44];let N;e[45]!==l?(N=o=>l("data_hora",o.target.value),e[45]=l,e[46]=N):N=e[46];let C;e[47]!==a.data_hora||e[48]!==N?(C=t.jsx(Y,{id:"data_hora",type:"datetime-local",value:a.data_hora,onChange:N}),e[47]=a.data_hora,e[48]=N,e[49]=C):C=e[49];let S;e[50]!==s.data_hora?(S=s.data_hora&&t.jsx("p",{className:"text-sm text-red-500",children:s.data_hora}),e[50]=s.data_hora,e[51]=S):S=e[51];let F;e[52]!==C||e[53]!==S?(F=t.jsxs("div",{className:"space-y-2",children:[me,C,S]}),e[52]=C,e[53]=S,e[54]=F):F=e[54];let de;e[55]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(i,{htmlFor:"valor",children:"Preç
1o"}),e[55]=de):de=e[55];let D;e[56]!==Ne||e[57]!==ye?(D=t.jsx(Y,{id:"valor",type:"text",inputMode:"numeric",value:ye,onChange:Ne,placeholder:"0,00",className:"decimal"}),e[56]=Ne,e[57]=ye,e[58]=D):D=e[58];let k;e[59]!==s.valor?(k=s.valor&&t.jsx("p",{className:"text-sm text-red-500",children:s.valor}),e[59]=s.valor,e[60]=k):k=e[60];let I;e[61]!==D||e[62]!==k?(I=t.jsxs("div",{className:"space-y-2",children:[de,D,k]}),e[61]=D,e[62]=k,e[63]=I):I=e[63];let ne;e[64]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx(i,{htmlFor:"status",children:"Status"}),e[64]=ne):ne=e[64];let V;e[65]!==l?(V=o=>l("status",o),e[65]=l,e[66]=V):V=e[66];let pe;e[67]===Symbol.for("react.memo_cache_sentinel")?(pe=t.jsx(Ge,{children:t.jsx(Je,{placeholder:"Selecione..."})}),e[67]=pe):pe=e[67];let L;e[68]!==m.statuses?(L=t.jsx(qe,{children:Object.entries(m.statuses).map(Xe)}),e[68]=m.statuses,e[69]=L):L=e[69];let T;e[70]!==a.status||e[71]!==V||e[72]!==L?(T=t.jsxs(ze,{value:a.status,onValueChange:V,children:[pe,L]}),e[70]=a.status,e[71]=V,e[72]=L,e[73]=T):T=e[73];let H;e[74]!==s.status?(H=s.status&&t.jsx("p",{className:"text-sm text-red-500",children:s.status}),e[74]=s.status,e[75]=H):H=e[75];let O;e[76]!==T||e[77]!==H?(O=t.jsxs("div",{className:"space-y-2",children:[ne,T,H]}),e[76]=T,e[77]=H,e[78]=O):O=e[78];let he;e[79]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(i,{htmlFor:"vencedor",children:"Vencedor"}),e[79]=he):he=e[79];let $;e[80]!==l?($=o=>l("vencedor",o.target.value),e[80]=l,e[81]=$):$=e[81];let w;e[82]!==a.vencedor||e[83]!==$?(w=t.jsx(Y,{id:"vencedor",value:a.vencedor,onChange:$,placeholder:""}),e[82]=a.vencedor,e[83]=$,e[84]=w):w=e[84];let B;e[85]!==s.vencedor?(B=s.vencedor&&t.jsx("p",{className:"text-sm text-red-500",children:s.vencedor}),e[85]=s.vencedor,e[86]=B):B=e[86];let E;e[87]!==w||e[88]!==B?(E=t.jsxs("div",{className:"space-y-2 lg:col-span-2",children:[he,w,B]}),e[87]=w,e[88]=B,e[89]=E):E=e[89];let R;e[90]!==l?(R=o=>l("covid19",o),e[90]=l,e[91]=R):R=e[91];let A;e[92]!==a.covid19||e[93]!==R?(A=t.jsx(ke,{id:"covid19",checked:a.covid19,onCheckedChange:R}),e[92]=a.covid19,e[93]=R,e[94]=A):A=e[94];let fe;e[95]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx(i,{htmlFor:"covid19",children:"COVID-19"}),e[95]=fe):fe=e[95];let M;e[96]!==A?(M=t.jsxs("div",{className:"flex items-center space-x-2",children:[A,fe]}),e[96]=A,e[97]=M):M=e[97];let P;e[98]!==s.covid19?(P=s.covid19&&t.jsx("p",{className:"text-sm text-red-500",children:s.covid19}),e[98]=s.covid19,e[99]=P):P=e[99];let q;e[100]!==M||e[101]!==P?(q=t.jsxs("div",{className:"space-y-2 lg:col-span-2",children:[M,P]}),e[100]=M,e[101]=P,e[102]=q):q=e[102];let z;e[103]!==f||e[104]!==v||e[105]!==y||e[106]!==F||e[107]!==I||e[108]!==O||e[109]!==E||e[110]!==q?(z=t.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-4",children:[f,v,y,F,I,O,E,q]}),e[103]=f,e[104]=v,e[105]=y,e[106]=F,e[107]=I,e[108]=O,e[109]=E,e[110]=q,e[111]=z):z=e[111];let xe;e[112]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsx(i,{htmlFor:"objeto",children:"Objeto"}),e[112]=xe):xe=e[112];let G;e[113]!==l?(G=o=>l("objeto",o.target.value),e[113]=l,e[114]=G):G=e[114];let J;e[115]!==a.objeto||e[116]!==G?(J=t.jsx(Qe,{id:"objeto",value:a.objeto,onChange:G,placeholder:"",rows:4}),e[115]=a.objeto,e[116]=G,e[117]=J):J=e[117];let K;e[118]!==s.objeto?(K=s.objeto&&t.jsx("p",{className:"text-sm text-red-500",children:s.objeto}),e[118]=s.objeto,e[119]=K):K=e[119];let Q;e[120]!==J||e[121]!==K?(Q=t.jsxs("div",{className:"space-y-2",children:[xe,J,K]}),e[120]=J,e[121]=K,e[122]=Q):Q=e[122];let je;e[123]===Symbol.for("react.memo_cache_sentinel")?(je=t.jsx(Ee,{href:"",children:t.jsx(De,{variant:"outline",type:"button",children:"Cancelar"})}),e[123]=je):je=e[123];let ue;e[124]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx(We,{className:"h-4 w-4"}),e[124]=ue):ue=e[124];const Fe=te?"Salvando...":"Salvar";let U;e[125]!==te||e[126]!==Fe?(U=t.jsxs("div",{className:"flex justify-end gap-4",children:[je,t.jsxs(De,{type:"submit",disabled:te,className:"flex items-center gap-2",children:[ue,Fe]})]}),e[125]=te,e[126]=Fe,e[127]=U):U=e[127];let W;e[128]!==Ce||e[129]!==z||e[130]!==Q||e[131]!==U?(W=t.jsxs(Me,{children:[oe,t.jsx(Pe,{children:t.jsxs("form",{onSubmit:Ce,className:"space-y-6",children:[z,Q,U]})})]}),e[128]=Ce,e[129]=z,e[130]=Q,e[131]=U,e[132]=W):W=e[132];let X;e[133]!==W||e[134]!==n?(X=t.jsxs("div",{className:"space-y-6 p-6",children:[n,W]}),e[133]=W,e[134]=n,e[135]=X):X=e[135];let ve;return e[136]!==d||e[137]!==X?(ve=t.jsxs(Ue,{children:[d,X]}),e[136]=d,e[137]=X,e[138]=ve):ve=e[138],ve}function Xe(c){const[e,ge]=c;return t.jsx(Ke,{value:e,children:ge},e)}function Ye(c){if(!c)return"";const e=Number(c)/100;return new Intl.NumberFormat("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}export{Jt 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.