import{j as t,r as f,aS as y,_ as S,d as h,f as b,O as l,m as D}from"./index-4e7882bc.js";import{L as F}from"./PictureAsPdf-e17bf6db.js";import{r as v}from"./GenericForm-05ca4a96.js";import{a as C}from"./MoreVert-215590fc.js";import"./mapValues-0f0ec740.js";import"./ContentCopy-9c99a3ec.js";import"./Delete-5ac3f3e4.js";import"./DataGrid-c017cd02.js";import"./toPropertyKey-4015efc6.js";import"./dividerClasses-9982a278.js";import"./listItemTextClasses-0d3e3a1a.js";import"./ListItemText-1b946f0b.js";import"./ImageViewerModal-8b66f0f6.js";import"./cjs-cef02a75.js";import"./AdmUsuarios-8b1dd2d5.js";import"./NoRowsComponent-94f1c2bb.js";import"./ListItemIcon-95e7eb22.js";import"./Divider-5402fd42.js";import"./useForm-d513b4be.js";import"./useThemeProps-f08c4918.js";import"./CardContent-a248f2dd.js";import"./Container-23973070.js";import"./createContainer-bad89460.js";import"./api-4cc4473e.js";import"./Avatar-518c4563.js";import"./_commonjs-dynamic-modules-f717653b.js";import"./env-198ff0f3.js";import"./Scheduler-e9c8d403.js";import"./___vite-browser-external_commonjs-proxy-784aa0e6.js";const lo=i=>{const{ejecutarAdministraWf:c,paramsProceso:p,isFirstTarea:n,mode:a,tarActual:s,dataPrc:u}=i,m=i.dataPrc;return m?t(A,{paramsProceso:p,solInfo:m,ejecutarAdministraWf:c,isFirstTarea:n,mode:a,tarActual:s,dataPrc:u}):t(F,{})},A=i=>{const{ejecutarAdministraWf:c,paramsProceso:p,tarActual:n}=i,a=i.dataPrc;f.useEffect(()=>{y.getData(a,["sol"]).then(o=>{o.sol!==void 0&&(r("SolNumDoc",o.sol.SolNumDoc),r("SolNumDoc",o.sol.SolNumDoc),r("SolCuit",o.sol.SolCuit),r("SolSex",o.sol.SolSex),r("SolNom",o.sol.SolNom),r("SolApe",o.sol.SolApe),r("SolFchNac",o.sol.SolFchNac),r("SolNivEst",o.sol.SolNivEst),r("SolNac",o.sol.SolNac),r("SolEstCiv",o.sol.SolEstCiv))}).catch(o=>{S.error("Error al buscar datos"),console.error(o)})},[]);const s={id:"DmnAbr",name:"SolSex",text:"DmnDet",tabla:"dmn",where:"DmnFilt = 'TIPSEX'",type:"supercombobox"},u={id:"DmnAbr",name:"SolNivEst",text:"DmnDet",tabla:"dmn",where:"DmnFilt = 'ESTNIV'",type:"supercombobox"},m={id:"NacAbr",name:"SolNac",text:"NacNom",tabla:"nac",type:"supercombobox"},N={id:"DmnAbr",name:"SolEstCiv",text:"DmnDet",tabla:"dmn",where:"DmnFilt = 'ESTCIV'",type:"supercombobox"},{control:e,handleSubmit:x,formState:E,setValue:r}=h({mode:"onChange",defaultValues:{SolNumDoc:"",SolCuit:"",SolApe:"",SolNom:"",SolFchNac:"",SolSex:"",SolNivEst:"",SolNac:"",SolEstCiv:""}});return t(C,{children:b("form",{onSubmit:x(o=>{v.guardar("Sol",{iprId:a,data:o}).then(d=>{if(!d.success){S.error("Error al guardar datos");return}c({out:o,act:"END",tar:n})}).catch(d=>{S.error("Error al guardar datos"),console.error(d)})},()=>{console.log(E.errors)}),children:[b("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"10px"},children:[t(l,{required:!0,control:e,name:"SolNumDoc",type:"number",label:"Número de documento"}),t(l,{required:!0,control:e,name:"SolCuit",type:"number",label:"CUIT"}),t(l,{required:!0,control:e,name:"SolApe",type:"text",label:"Apellido"}),t(l,{required:!0,control:e,name:"SolNom",type:"text",label:"Nombre"}),t(l,{required:!0,control:e,name:"SolFchNac",type:"date",label:"Fecha de Nacimiento"}),t(l,{required:!0,control:e,name:"SolSex",type:"supercombobox",label:"Sexo",iField:s}),t(l,{required:!0,control:e,name:"SolNivEst",type:"supercombobox",label:"Nivel de estudio",iField:u}),t(l,{required:!0,control:e,name:"SolNac",type:"supercombobox",label:"Nacionalidad",iField:m}),t(l,{required:!0,control:e,name:"SolEstCiv",type:"supercombobox",label:"Estado civil",iField:N})]}),i.mode!=="history"&&t("div",{style:{display:"flex",justifyContent:"end",marginTop:"10px"},children:t(D,{sx:{marginLeft:"10px"},color:"secondary",type:"submit",variant:"contained",children:"Continuar"})})]})})};export{lo as default};
