import{r as c,aS as a,j as e,P as h,f as i,T as o,S as p}from"./index-4e7882bc.js";const g=({iprId:l,setHeaderIsLoading:d,setHeaderConError:m,tarId:f})=>{const[n,s]=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),s(t)}).catch(r=>{m(!0),console.error(r)}).finally(()=>{d(!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{g as default};
