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-ca24af84.js";import b from"./upFileSol-b069e547.js";import{t as I}from"./CustomCard-ed471f03.js";import"./Delete-2851117c.js";import"./api-2d3a9910.js";import"./Loader-d02a9406.js";import"./ImageViewerModal-515fd301.js";import"./cjs-8bb62be0.js";import"./DataGrid-e816acb7.js";import"./toPropertyKey-4015efc6.js";import"./dividerClasses-fa4eeeba.js";import"./listItemTextClasses-9e4a600e.js";import"./CardContent-5a26e0f6.js";import"./NoRowsComponent-10f615cd.js";import"./ListItemIcon-2dd9a578.js";import"./_hasUnicode-ddaf981e.js";import"./ContentCopy-b55fe92c.js";import"./ListItemText-eb0972a7.js";import"./AdmUsuarios-43c7c459.js";import"./Divider-21330109.js";import"./MoreVert-f89677c2.js";import"./createContainer-b0287129.js";import"./useForm-8dad0a2a.js";import"./useThemeProps-95e03d4e.js";import"./Container-30ca10cd.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 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};
