import{r as a,aT as e,f as r,P as C,j as o,T as u,S as T,F as w,m as h,am as f}from"./index-7ecf457b.js";import b from"./upFileSol-62d25d19.js";import{t as I}from"./CustomCard-2df78ba7.js";import"./Delete-ccdde0a3.js";import"./api-cbc533e6.js";import"./Loader-593abaf4.js";import"./ImageViewerModal-0c131c88.js";import"./cjs-ca8cc029.js";import"./DataGrid-3587fdf7.js";import"./toPropertyKey-4015efc6.js";import"./dividerClasses-c3ed4a16.js";import"./listItemTextClasses-1aee403b.js";import"./CardContent-85d1a348.js";import"./NoRowsComponent-1c8da2c3.js";import"./ListItemIcon-6852b595.js";import"./_hasUnicode-8e92af18.js";import"./ContentCopy-5fea55d8.js";import"./ListItemText-1297b456.js";import"./AdmUsuarios-1abd694f.js";import"./Divider-859f9096.js";import"./MoreVert-dbd138df.js";import"./createContainer-f29fb9c0.js";import"./useForm-26d3e0f9.js";import"./useThemeProps-71110af6.js";import"./Container-74bcd912.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 rt=({iprId:n,setHeaderIsLoading:g,setHeaderConError:y,tarId:l,component:S})=>{const[s,x]=a.useState(null),[c,p]=a.useState(!1),[m,d]=a.useState(!1);a.useEffect(()=>{e.getData(n,["sol","wfiproc"]).then(t=>{const i={};if(e.isTruthy(t.sol)){const v=`${e.isTruthy(t.sol.SolApe)?`${t.sol.SolApe},`:""} ${t.sol.SolNom??""}`;i.Nombre=v.trim(),i.DNI=t.sol.SolNumDoc,i.Socio="",`${t.sol.SolSoc}`.length>0&&(i.Socio=e.isTruthy(t.sol.SolSoc)?"Si":"No")}e.isTruthy(t.wfiproc)&&(i["Nro. de referencia"]=t.wfiproc.IPrRefId,i.Cración=t.wfiproc.IPrFchIni,i["Tramite Nro."]=t.wfiproc.IPrId),x(i)}).catch(t=>{y(!0),console.error(t)}).finally(()=>{g(!1)})},[l]);const j=["upFileSol","instanciaproceso","instanciaprocesotelefono","upFileSolChckContrato"];return r(C,{style:{display:"grid",gridTemplateColumns:"auto minmax(min-content, 140px)",width:"100%",backgroundColor:"rgb(229, 246, 253)",padding:"15px 25px"},variant:"elevation",elevation:0,children:[r("div",{style:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[o(u,{variant:"h6",children:"Información"}),s===null?o("p",{children:"No se encontraron datos de cabecera"}):o(T,{direction:{xs:"column",sm:"row"},gap:2,children:Object.entries(s).map(t=>r(u,{variant:"subtitle2",style:{margin:"none",padding:"none"},children:[r("b",{children:[t[0],":"]})," ",e.isTruthy(t[1])?t[1]:"-"," "]},`dato_${t[0]}`))})]}),r("div",{style:{display:"grid",gridTemplateRows:"auto auto",rowGap:"5px"},children:[j.includes(S)?o(w,{}):r(h,{color:"primary",size:"small",variant:"contained",onClick:()=>{p(!0)},children:["Adjuntos ",o("span",{style:{fontSize:"15px",marginLeft:"10px"},children:"📎"})]}),r(h,{color:"primary",size:"small",variant:"contained",onClick:()=>{d(!0)},children:["Mensajes ",o("span",{style:{fontSize:"15px",marginLeft:"10px"},children:"💬"})]})]}),c&&o(f,{open:c,onClose:()=>{p(!1)},fullWidth:!0,maxWidth:"lg",children:o("div",{style:{margin:"20px 0"},children:o(b,{dataPrc:n,ejecutarAdministraWf:()=>{},mode:"libre",checkContratosForzado:!1,rowSelected:{},getDataprc:void 0,tarActual:void 0,paramsProceso:void 0})})}),m&&o(f,{open:m,onClose:()=>{d(!1)},fullWidth:!0,maxWidth:"lg",children:o("div",{style:{margin:"40px"},children:o(I,{iprId:n,iTarId:0,tarId:l})})})]})};export{rt as default};
