import{j as t,r as f,i as y,_ as S,d as h,l as b,O as l,z as D}from"./index-57016b76.js";import{L as C}from"./PictureAsPdf-126488ed.js";import{r as F}from"./GenericForm-a690ea03.js";import{C as v}from"./MoreVert-da30352a.js";import"./ContentCopy-e0134b7d.js";import"./Delete-ba857bbc.js";import"./ListItemText-3dfae1c8.js";import"./ImageViewerModal-a7f3c92e.js";import"./cjs-ea3f05b9.js";import"./AdmUsuarios-d13acbb1.js";import"./Edit-16d4c257.js";import"./ListItemIcon-cdc64cd8.js";import"./Divider-03534251.js";import"./NoRowsComponent-f6adf5c7.js";import"./useForm-55429ca1.js";import"./useThemeProps-dc4c84f8.js";import"./Card-d0765abf.js";import"./CardContent-ad10b9d8.js";import"./Container-fe1ab53f.js";import"./createContainer-80c97b9d.js";import"./OmegaTransferList-324e0c3a.js";import"./CardHeader-52227172.js";import"./Avatar-f2a35a83.js";import"./_commonjs-dynamic-modules-9a12d94c.js";import"./env-198ff0f3.js";import"./mapValues-ef9c4214.js";import"./Scheduler-2873f738.js";import"./___vite-browser-external_commonjs-proxy-2173480c.js";const eo=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(C,{})},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(v,{children:b("form",{onSubmit:x(o=>{F.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{eo as default};
