import{d as p,r as g,m as i,o as d,a as e,b as n,e as m,t as o,D as u,g as _,u as y,y as h,z as v,x as w,A as k,c as D,w as N,_ as A,C as I,F as U,p as C}from"./index-URM8LaDt.js";const L={class:"p-6 w-full max-w-full bg-white rounded-3xl border border-gray-200 shadow-lg"},E={class:"mb-6 text-center"},$={class:"inline-flex justify-center items-center mx-auto mb-3 w-16 h-16 bg-blue-100 rounded-full"},q={class:"font-medium text-gray-600"},B={class:"text-blue-600"},F={class:"font-medium text-gray-600"},S={class:"text-blue-600"},V={class:"text-blue-600"},j={class:"pt-4 space-y-4 border-t border-gray-100"},z={class:"flex items-center p-3 bg-blue-50 rounded-xl"},M={class:"ml-1 font-bold text-blue-600"},H={class:"flex items-center p-3 bg-blue-50 rounded-xl"},P={class:"ml-1 font-bold text-blue-600"},R={class:"flex items-center p-3 bg-blue-50 rounded-xl"},T={class:"ml-1 font-bold text-blue-600"},X={class:"flex items-center p-3 bg-blue-50 rounded-xl"},G={class:"ml-1 font-bold text-blue-600"},J={class:"flex items-center p-3 bg-blue-50 rounded-xl"},K={class:"ml-1 font-bold text-blue-600"},O={class:"flex items-center p-3 bg-blue-50 rounded-xl"},Q={class:"ml-1 italic font-mediums text-slate-500"},W={class:"p-3 mt-4 bg-yellow-50 rounded-lg border border-gray-200"},Y={class:"flex items-start"},Z={class:"w-full"},ee={class:"text-sm text-gray-600"},se={class:"ml-1 font-semibold text-blue-600"},te={class:"flex gap-2 items-center mt-1 text-xs text-yellow-600"},ae=p({__name:"CardInfo",props:{createdAt:{},formattedDate:{},userId:{},expertUid:{},day:{},hour:{},expertName:{},specialty:{},professionalId:{},appointmentLink:{}},setup(f){return(t,s)=>{const l=g("v-icon");return d(),i("div",L,[e("div",E,[e("div",$,[n(l,{name:"bi-calendar-check",class:"text-2xl text-blue-600"})]),s[3]||(s[3]=e("h3",{class:"mb-1 text-lg font-semibold text-gray-800"},"Cita agendada",-1)),e("p",q,[s[0]||(s[0]=m(" Para el ")),e("span",B,o(t.day)+" "+o(t.formattedDate),1)]),e("p",F,[s[1]||(s[1]=m(" A las ")),e("span",S,o(t.hour),1),s[2]||(s[2]=m(" con ")),e("span",V,o(t.expertName),1)])]),e("div",j,[e("div",z,[n(l,{name:"bi-calendar2-minus",class:"mr-2 text-blue-600"}),s[4]||(s[4]=e("span",{class:"font-medium text-gray-700"},"Día:",-1)),e("span",M,o(t.day+" "+t.formattedDate),1)]),e("div",H,[n(l,{name:"bi-alarm",class:"mr-2 text-blue-600"}),s[5]||(s[5]=e("span",{class:"font-medium text-gray-700"},"Hora:",-1)),e("span",P,o(t.hour),1)]),e("div",R,[n(l,{name:"fa-user-md",class:"mr-2 text-blue-600"}),s[6]||(s[6]=e("span",{class:"font-medium text-gray-700"},"Nombre:",-1)),e("span",T,o(t.expertName),1)]),e("div",X,[n(l,{name:"fa-briefcase-medical",class:"mr-2 text-blue-600"}),s[7]||(s[7]=e("span",{class:"font-medium text-gray-700"},"Especialidad:",-1)),e("span",G,o(t.specialty),1)]),e("div",J,[n(l,{name:"fa-id-card",class:"mr-2 text-blue-600"}),s[8]||(s[8]=e("span",{class:"font-medium text-gray-700"},"Cédula profesional:",-1)),e("span",K,o(t.professionalId),1)]),e("div",O,[n(l,{name:"fa-link",class:"mr-2 text-blue-600"}),s[9]||(s[9]=e("span",{class:"font-medium text-gray-700"},"Enlace de la cita:",-1)),e("span",Q,o(t.appointmentLink!==""?t.appointmentLink:"El enlace de la cita estará generado una vez el administrador lo asigne"),1)])]),e("div",W,[e("div",Y,[e("div",Z,[e("p",ee,[s[10]||(s[10]=e("span",{class:"font-medium"},"Registrado el:",-1)),e("span",se,o(new Date(t.createdAt.seconds*1e3).toLocaleDateString("es-MX",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})),1)]),e("p",te,[n(l,{name:"bi-info-circle",class:"text-yellow-600"}),s[11]||(s[11]=m(" Esta es la fecha en que se registró su cita, no la fecha de su consulta. "))])])])])])}}}),oe={class:""},le={key:0,class:"flex justify-center items-center h-full"},ne={key:1,class:"flex flex-col gap-4 py-7 bg-gray-100 ion-padding min-h-dvh"},de=p({__name:"ClientAppointmentsView",setup(f){u();const t=_([]),s=y(),l=h(w(s,`users/${u().getUserUid}/FutureAppointments`),v("userId","==",u().getUserUid)),x=async()=>{try{const r=await I(l);if(r.empty)return;r.forEach(c=>{console.log(c.data())}),t.value=r.docs.map(c=>c.data())}catch(r){console.log(r)}};return k(()=>{x()}),(r,c)=>(d(),D(A,null,{main:N(()=>[e("section",null,[e("div",oe,[t.value.length===0?(d(),i("div",le," No tienes citas futuras ")):(d(),i("div",ne,[(d(!0),i(U,null,C(t.value.filter(a=>a.expertName!=null),(a,b)=>(d(),i("div",{key:b,class:"flex flex-col gap-5 px-2"},[n(ae,{createdAt:a.createdAt,formattedDate:a.formattedDate,userId:a.userId,expertUid:a.expertUid,day:a.day,hour:a.hour,expertName:a.expertName,specialty:a.specialty,professionalId:a.professionalId,appointmentLink:a.appointmentLink},null,8,["createdAt","formattedDate","userId","expertUid","day","hour","expertName","specialty","professionalId","appointmentLink"])]))),128))]))])])]),_:1}))}});export{de as default};
