import{j as k,y as w,x as C,q as B,f as c,i as l,b as e,v as s,w as f,F as S,t as M,G as d,c as u,u as A,A as N,r as n,d as V,e as q}from"./index-DLUb5LSe.js";import{u as F}from"./data-D7xXWmPy.js";import{_ as P}from"./TopBar.vue_vue_type_script_setup_true_lang-DNeo4_WD.js";import{_ as j}from"./BottomNav.vue_vue_type_script_setup_true_lang-BcRvF8NM.js";const D={class:"pb-32 min-h-dvh"},E={class:"max-w-md mx-auto px-4 pt-2"},H={class:"py-4"},I={class:"text-display"},L={class:"text-meta text-ink-muted mt-1"},R={class:"grid grid-cols-2 gap-3"},$={class:"text-3xl"},G={class:"font-bold text-body mt-2"},O={class:"text-meta text-ink-muted"},z={key:0,class:"absolute top-3 right-3 w-6 h-6 rounded-full bg-red-500 text-white text-[11px] font-bold flex items-center justify-center"},J={class:"mt-5 rounded-card bg-surface shadow-card divide-y divide-ink/5 overflow-hidden"},X=k({__name:"MoreView",setup(K){const h=N(),a=F(),_=w(),m=C();B(()=>{a.loadInvoices(),a.loadMessages()});const g=u(()=>(a.invoices??[]).filter(o=>o.balance>0).length),x=u(()=>(a.messages??[]).filter(o=>o.sender==="clinic"&&!o.is_read).length),v=u(()=>[{icon:"💬",label:"Messages",to:"/inbox",badge:x.value,sub:"Chat with the clinic"},{icon:"📄",label:"Reports",to:"/reports",sub:"Medical reports & visit notes"},{icon:"💊",label:"Prescriptions",to:"/prescriptions",sub:"Active meds + refill requests"},{icon:"🧪",label:"Lab results",to:"/labs",sub:"Blood work, urinalysis"},{icon:"🧾",label:"Invoices",to:"/invoices",badge:g.value,sub:"Bills & payment status"},{icon:"🩺",label:"Ask a vet",to:"/telehealth",sub:"Photo + question for triage"},{icon:"🏥",label:"Hospital",to:"/admissions",sub:"Active stays & history"},{icon:"🔍",label:"Search",to:"/search",sub:"Find anything in your account"},{icon:"🚨",label:"Emergency",to:"/emergency",sub:"Call clinic / get directions"}]);function y(){m.logout(),h.replace("/login")}return(o,i)=>{var b,p;const r=A("router-link");return n(),c("div",D,[l(P),e("main",E,[e("header",H,[e("h1",I,"Hello, "+s(((p=(b=f(m).me)==null?void 0:b.name)==null?void 0:p.split(" ")[0])??"there"),1),e("p",L,s(f(_).brand.name),1)]),e("div",R,[(n(!0),c(S,null,M(v.value,t=>(n(),V(r,{key:t.to,to:t.to,class:"relative rounded-card bg-surface shadow-card p-4 active:scale-[0.98] transition flex flex-col"},{default:d(()=>[e("div",$,s(t.icon),1),e("div",G,s(t.label),1),e("div",O,s(t.sub),1),t.badge&&t.badge>0?(n(),c("span",z,s(t.badge),1)):q("",!0)]),_:2},1032,["to"]))),128))]),e("ul",J,[e("li",null,[l(r,{to:"/me/profile",class:"block px-5 py-4 hover:bg-surface-muted"},{default:d(()=>[...i[0]||(i[0]=[e("div",{class:"text-body font-semibold"},"Profile",-1),e("div",{class:"text-meta text-ink-muted"},"Name, phone, email",-1)])]),_:1})]),e("li",null,[l(r,{to:"/me",class:"block px-5 py-4 hover:bg-surface-muted"},{default:d(()=>[...i[1]||(i[1]=[e("div",{class:"text-body font-semibold"},"Settings",-1),e("div",{class:"text-meta text-ink-muted"},"Notifications, theme, install",-1)])]),_:1})]),e("li",null,[e("button",{class:"w-full px-5 py-4 text-left text-red-600 font-semibold hover:bg-red-50",onClick:y}," Sign out ")])])]),l(j)])}}});export{X as default};
//# sourceMappingURL=MoreView-DxhXCxZy.js.map
