import{p as j,o as q,G as w,s as i,v as n,n as v,q as g,d as f,k as s,l as A,g as l,f as o,t as G,u as L,j as M,c as N}from"./dark-mode-CoQquDYq.js";var P=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 D(x,m){j(m,!0);let p=n(!0),c=n(!1),d=n(!1);q(async()=>{try{const a=await w();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=v(),y=g(u);{var b=a=>{var r=P();s(a,r)},_=a=>{var r=v(),k=g(r);{var h=e=>{var t=z();s(e,t)},S=e=>{var t=B(),F=N(t);G(()=>{L(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"}`),M(F,l(d)?"Premium":"Free")}),s(e,t)};f(k,e=>{l(c)?e(S,!1):e(h)},!0)}s(a,r)};f(y,a=>{l(p)?a(b):a(_,!1)})}s(x,u),A()}export{D as S};
