import{j as t,r as f,aT as y,_ as S,d as h,f as b,bR as l,m as D}from"./index-7ecf457b.js";import{L as F}from"./Loader-593abaf4.js";import{r as v}from"./CustomCard-2df78ba7.js";import{a as C}from"./MoreVert-dbd138df.js";import"./_hasUnicode-8e92af18.js";import"./ContentCopy-5fea55d8.js";import"./Delete-ccdde0a3.js";import"./DataGrid-3587fdf7.js";import"./toPropertyKey-4015efc6.js";import"./dividerClasses-c3ed4a16.js";import"./listItemTextClasses-1aee403b.js";import"./ListItemText-1297b456.js";import"./ImageViewerModal-0c131c88.js";import"./cjs-ca8cc029.js";import"./AdmUsuarios-1abd694f.js";import"./Divider-859f9096.js";import"./NoRowsComponent-1c8da2c3.js";import"./ListItemIcon-6852b595.js";import"./useForm-26d3e0f9.js";import"./useThemeProps-71110af6.js";import"./CardContent-85d1a348.js";import"./Container-74bcd912.js";import"./createContainer-f29fb9c0.js";import"./api-cbc533e6.js";import"./Avatar-11330c7e.js";import"./_commonjs-dynamic-modules-72cef10b.js";import"./env-198ff0f3.js";import"./Scheduler-6934af1e.js";import"./___vite-browser-external_commonjs-proxy-c6974f23.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};
