import{d as v,u as y,r as g,B as w,c as C,j as x,a as t,t as o,f as s,n as l,g as S,C as j,o as h}from"./index-b7Iy0dz5.js";import{_ as B}from"./TopBar.vue_vue_type_script_setup_true_lang-CME3XXLt.js";import{_ as D}from"./BottomNav.vue_vue_type_script_setup_true_lang-CF62GDaf.js";const M={class:"pb-24"},N={class:"max-w-md mx-auto px-4 mt-4 space-y-4"},V={class:"card p-4 flex items-center gap-3"},$={class:"w-12 h-12 rounded-full bg-brand-500/15 text-brand-700 flex items-center justify-center text-xl font-bold"},A={class:"min-w-0"},R={class:"font-semibold truncate"},W={class:"text-meta text-ink-subtle truncate"},Y={class:"card divide-y divide-ink/5"},z={class:"card p-4 text-meta text-ink-subtle"},E={class:"flex items-center justify-between"},O={class:"flex items-center justify-between mt-1"},H=v({__name:"MoreView",setup(P){const i=S(),n=y(),a=g(w());function b(){a.value=!a.value,j(a.value)}async function _(){await n.logout(),i.replace("/login")}return(T,e)=>{var r,u,d,c,m,p,f;return h(),C("div",M,[x(B,{title:"More"}),t("div",N,[t("div",V,[t("div",$,o((((r=s(n).me)==null?void 0:r.name)??"?").slice(0,1)),1),t("div",A,[t("div",R,o((u=s(n).me)==null?void 0:u.name),1),t("div",W,"Staff · @"+o((d=s(n).me)==null?void 0:d.username),1)])]),t("nav",Y,[t("button",{onClick:e[0]||(e[0]=k=>s(i).push("/board")),class:"w-full flex items-center justify-between px-4 py-3 text-body"},[...e[2]||(e[2]=[t("span",null,"🧰 Workshop board",-1),t("span",{class:"text-ink-subtle"},"›",-1)])]),t("button",{onClick:e[1]||(e[1]=k=>s(i).push("/summary")),class:"w-full flex items-center justify-between px-4 py-3 text-body"},[...e[3]||(e[3]=[t("span",null,"📊 Summary",-1),t("span",{class:"text-ink-subtle"},"›",-1)])]),t("button",{onClick:b,class:"w-full flex items-center justify-between px-4 py-3 text-body"},[e[4]||(e[4]=t("span",null,"🌙 Dark mode",-1)),t("span",{class:l(["w-10 h-6 rounded-pill transition relative",a.value?"bg-brand-600":"bg-ink-subtle/30"])},[t("span",{class:l(["absolute top-0.5 w-5 h-5 rounded-full bg-white transition-all",a.value?"left-[18px]":"left-0.5"])},null,2)],2)])]),t("div",z,[t("div",E,[e[5]||(e[5]=t("span",null,"Manage orders",-1)),t("span",{class:l((c=s(n).me)!=null&&c.can.manage_orders?"text-status-ok":"text-ink-subtle")},o((m=s(n).me)!=null&&m.can.manage_orders?"Yes":"No"),3)]),t("div",O,[e[6]||(e[6]=t("span",null,"Manage inspections",-1)),t("span",{class:l((p=s(n).me)!=null&&p.can.manage_inspections?"text-status-ok":"text-ink-subtle")},o((f=s(n).me)!=null&&f.can.manage_inspections?"Yes":"No"),3)])]),t("button",{onClick:_,class:"w-full card py-3 text-status-crit font-semibold"},"Sign out"),e[7]||(e[7]=t("p",{class:"text-center text-micro text-ink-subtle"},"SaaS One · VRC Staff PWA · v0.1",-1))]),x(D)])}}});export{H as default};
//# sourceMappingURL=MoreView-D6jC-ENQ.js.map
