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-ca24af84.js";import{L as F}from"./Loader-d02a9406.js";import{r as v}from"./CustomCard-ed471f03.js";import{a as C}from"./MoreVert-f89677c2.js";import"./_hasUnicode-ddaf981e.js";import"./ContentCopy-b55fe92c.js";import"./Delete-2851117c.js";import"./DataGrid-e816acb7.js";import"./toPropertyKey-4015efc6.js";import"./dividerClasses-fa4eeeba.js";import"./listItemTextClasses-9e4a600e.js";import"./ListItemText-eb0972a7.js";import"./ImageViewerModal-515fd301.js";import"./cjs-8bb62be0.js";import"./AdmUsuarios-43c7c459.js";import"./Divider-21330109.js";import"./NoRowsComponent-10f615cd.js";import"./ListItemIcon-2dd9a578.js";import"./useForm-8dad0a2a.js";import"./useThemeProps-95e03d4e.js";import"./CardContent-5a26e0f6.js";import"./Container-30ca10cd.js";import"./createContainer-b0287129.js";import"./api-2d3a9910.js";import"./Avatar-aaf77463.js";import"./_commonjs-dynamic-modules-cdfc6db0.js";import"./env-198ff0f3.js";import"./Scheduler-25474e0a.js";import"./___vite-browser-external_commonjs-proxy-7014dc98.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};
