1import{d as g,u as k,C as w,w as M,c as n,e as t,f as m,g as x,h as s,t as C,F,r as N,s as B,x as b,_ as D,b as r,i as V,m as L}from"./aDqk-s0q.js";import{u as S,_ as j,a as A}from"./G6RnRrul.js";import"./DlAUqK2U.js";const q={class:"max-w-2xl mx-auto px-4 py-4"},z={class:"flex items-center gap-3 mb-4"},E={key:0,class:"text-center py-16 text-on-surface-variant"},H={key:1,class:"text-center py-12 text-sm text-on-surface-variant"},R={key:2,class:"rounded-xl border border-error/30 bg-error/5 p-4 text-sm text-error"},T={key:3,class:"rounded-2xl border border-outline-variant/30 bg-surface-container-lowest p-10 text-center"},U={key:4,class:"space-y-4"},J=g({__name:"memberships",setup(W){k({title:"My Memberships · xquare hub"});const{isAuthenticated:l}=w(),{memberships:p,loading:_,error:u,loadMyMemberships:f}=S();M(l,o=>{o&&f()},{immediate:!0});const c=b(null),a=b(!1);function h(o){c.value=o,a.value=!0}return(o,e)=>{const d=D,y=A,v=j;return r(),n("div",q,[t("header",z,[m(d,{to:"/m/account",class:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-surface-container-lowest hover:bg-surface-variant border border-outline-variant/30"},{default:x(()=>[...e[1]||(e[1]=[t("span",{class:"material-symbols-outlined text-base"},"arrow_back",-1)])]),_:1}),e[2]||(e[2]=t("div",null,[t("h1",{class:"text-lg font-extrabold tracking-tight text-on-surface"},"My Memberships"),t("p",{class:"text-xs text-on-surface-variant mt-0.5"},"Your active memberships, spaces & perks.")],-1))]),s(l)?s(_)?(r(),n("div",H,"Loadingâ¦")):s(u)?(r(),n("div",R,C(s(u)),1)):s(p).length===0?(r(),n("div",T,[...e[6]||(e[6]=[t("span",{class:"material-symbols-outlined text-on-surface-variant",style:{"font-size":"2.75rem"}},"card_membership",-1),t("p",{class:"mt-3 text-sm font-semibold text-on-surface"},"No memberships yet",-1),t("p",{class:"mt-1 text-xs text-on-surface-variant max-w-xs mx-auto"}," When you join a vendor's membership, it appears here with the spaces it unlocks and the perks you get. ",-1)])])):(r(),n("div",U,[(r(!0),n(F,null,N(s(p),i=>(r(),L(y,{key:i.tier_id,membership:i,"space-base":"/m/spaces",dense:"",onView:h},null,8,["membership"]))),128))])):(r(),n("div",E,[e[4]||(e[4]=t("span",{class:"material-symbols-outlined text-5xl block mb-3"},"card_membership",-1)),e[5]||(e[5]=t("p",{class:"text-sm mb-4"},"Sign in to see your memberships.",-1)),m(d,{to:"/sign-in?redirect=%2Fm%2Faccount%2Fmemberships",class:"inline-block px-4 py-2 rounded-lg bg-primary text-on-primary text-sm font-semibold"},{default:x(()=>[...e[3]||(e[3]=[V(" Sign in ",-1)])]),_:1})])),m(v,{open:s(a),"onUpdate:open":e[0]||(e[0]=i=>B(a)?a.value=i:null),membership:s(c),base:"/m"},null,8,["open","membership"])])}}});export{J as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.