import{r as c,i as a,j as e,P as h,l as i,T as o,a3 as p}from"./index-57016b76.js";const g=({iprId:l,setHeaderIsLoading:d,setHeaderConError:m,tarId:s})=>{const[n,f]=c.useState(null);return c.useEffect(()=>{a.getDataFrm(l,["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.Cración=r.wfiproc.IPrFchIni,t["Tramite Nro."]=r.wfiproc.IPrId),f(t)}).catch(r=>{m(!0),console.error(r)}).finally(()=>{d(!1)})},[s]),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{g as default};
