import{H as i,r as n}from"./index-BJRAPt-R.js";function u(){const a=n([]),t=n([]),s=n(!1),r=n("");async function o(){s.value=!0,r.value="";try{const e=(await i.getExpediente()).data;e&&Array.isArray(e.appointments)?(t.value=e.appointments,a.value=Array.isArray(e.photos)?e.photos:[]):Array.isArray(e)?(a.value=e,t.value=[]):(a.value=[],t.value=[])}catch{r.value="No pudimos cargar tu expediente.",a.value=[],t.value=[]}finally{s.value=!1}}return{expedientePhotos:a,expedienteAppointments:t,expedienteLoading:s,expedienteError:r,loadExpediente:o}}export{u};
