import{p as F,o as q,aC as A,k as i,h as n,x as g,w as v,q as x,e as s,g as C,l,f as o,t as L,r as M,b as N,c as P}from"./dark-mode-DfOwWnFq.js";var j=o('<div class="text-xs px-2 py-1 rounded-full bg-gray-100 text-gray-800 dark:bg-gray-800/50 dark:text-gray-400 flex items-center"><span class="flex space-x-1"><span class="animate-pulse">•</span> <span class="animate-pulse delay-75">•</span> <span class="animate-pulse delay-150">•</span></span></div>'),z=o('<div class="text-xs px-2 py-1 rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400">Not logged in</div>'),B=o("<div> </div>");function E(f,m){F(m,!0);let p=n(!0),c=n(!1),d=n(!1);q(async()=>{try{const a=await A();i(c,a!==null),i(d,(a==null?void 0:a.subscription)===!0)}catch(a){console.error("Failed to check subscription status:",a)}finally{i(p,!1)}});var u=g(),y=v(u);{var b=a=>{var r=j();s(a,r)},_=a=>{var r=g(),k=v(r);{var h=e=>{var t=z();s(e,t)},S=e=>{var t=B(),w=P(t);L(()=>{M(t,1,`text-xs px-2 py-1 rounded-full ${l(d)?"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-400":"bg-gray-100 text-gray-800 dark:bg-gray-800/50 dark:text-gray-400"}`),N(w,l(d)?"Premium":"Free")}),s(e,t)};x(k,e=>{l(c)?e(S,!1):e(h)},!0)}s(a,r)};x(y,a=>{l(p)?a(b):a(_,!1)})}s(f,u),C()}export{E as S};
