import{i as c}from"./emotion-use-insertion-effect-with-fallbacks.browser.esm-2ce7a1bc.js";import{a as e,j as i}from"./Tooltip-5ec3092e.js";import{m as a}from"./index-50f78195.js";const{Paper:h,Stack:p,Typography:o}=await c("@mui/material"),{useEffect:y,useState:g}=await c("react"),x=({iprId:m,setHeaderIsLoading:l,setHeaderConError:d,tarId:f})=>{const[n,s]=g(null);return y(()=>{a.getDataFrm(m,["frmt","wfiproc"]).then(r=>{const t={};if(a.isTruthy(r.frmt)){const u=`${a.isTruthy(r.frmt.FrmtApe)?`${r.frmt.FrmtApe},`:""} ${r.frmt.FrmtNom??""}`;t.Nombre=u.trim(),t.DNI=r.frmt.FrmtDni}a.isTruthy(r.wfiproc)&&(t["Nro. de referencia"]=r.wfiproc.IPrRefId,t.Creación=r.wfiproc.IPrFchIni,t["Tramite Nro."]=r.wfiproc.IPrId),s(t)}).catch(r=>{d(!0),console.error(r)}).finally(()=>{l(!1)})},[f]),e(h,{style:{display:"grid",gridTemplateColumns:"auto",width:"100%",backgroundColor:"rgb(229, 246, 253)",padding:"15px 25px"},variant:"elevation",elevation:0,children:i("div",{style:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[e(o,{variant:"h6",children:"Información"}),n===null?e("p",{children:"No se encontraron datos de cabecera"}):e(p,{direction:{xs:"column",sm:"row"},gap:2,children:Object.entries(n).map(r=>i(o,{variant:"subtitle2",style:{margin:"none",padding:"none"},children:[i("b",{children:[r[0],":"]})," ",a.isTruthy(r[1])?r[1]:"-"," "]},`dato_${r[0]}`))})]})})};export{x as default};
