import{i as n}from"./emotion-use-insertion-effect-with-fallbacks.browser.esm-6809063d.js";import{j as e,a as o}from"./Tooltip-ae8d7992.js";import{m as t}from"./index-dfa17bed.js";const{Paper:f,Stack:u,Typography:c}=await n("@mui/material"),{useEffect:p,useState:h}=await n("react"),w=({iprId:l,setHeaderIsLoading:s,setHeaderConError:d})=>{const[i,m]=h(null);return p(()=>{t.getData(l,["sol","wfiproc","solcrd"]).then(r=>{const a={};t.isTruthy(r.sol)&&(a.Nombre=r.sol.SolNom,a.DNI=r.sol.SolNumDoc),t.isTruthy(r.wfiproc)&&(a["Nro. de referencia"]=r.wfiproc.IPrRefId,a.Creación=r.wfiproc.IPrFchIni,a["Tramite Nro."]=r.wfiproc.IPrId),t.isTruthy(r.solcrd)&&(a.Disponible=t.formateaImporte(r.solcrd.SolDspImp)),m(a)}).catch(r=>{d(!0),console.error(r)}).finally(()=>{s(!1)})},[]),e(f,{style:{display:"flex",flexDirection:"column",justifyContent:"space-between",backgroundColor:"rgb(229, 246, 253)",padding:"15px 25px"},variant:"elevation",elevation:0,children:[o(c,{variant:"h6",children:"Información"}),i===null?o("p",{children:"No se encontraron datos de cabecera"}):o(u,{direction:{xs:"column",sm:"row"},gap:2,children:Object.entries(i).map(r=>e(c,{variant:"subtitle2",style:{margin:"none",padding:"none"},children:[e("b",{children:[r[0],":"]})," ",t.isTruthy(r[1])?r[1]:"-"," "]},`dato_${r[0]}`))})]})};export{w as default};
