import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{Bt as t,F as n,Ht as r,R as i,Rt as a,Ut as o,Y as s,_t as c,et as l,k as u,kt as d,pt as f}from"./vendor-vue-core-BdhYaYlO.js";import{t as p}from"./types-Bc3W4AWd.js";import{t as m}from"./telemetry-B10ff63e.js";import{t as h}from"./src-zUtq9Eft.js";import{t as g}from"./Button-DHxPjNdi.js";import{Yr as _,Zr as v}from"./dialogService-CwVeD8j9.js";var y=i({__name:`SubscribeButton`,props:{label:{},size:{default:`lg`},variant:{default:`default`},fluid:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:[`subscribed`],setup(e,{emit:i}){let y=i,{isActiveSubscription:b,showSubscriptionDialog:x}=_(),{subscriptionTier:S}=v(),C=d(!1);f([C,b],([e,t])=>{p&&e&&t&&(y(`subscribed`),C.value=!1)});let handleSubscribe=()=>{p&&m()?.trackSubscription(`subscribe_clicked`,{current_tier:S.value?.toLowerCase()}),C.value=!0,x()};return s(()=>{C.value=!1}),(e,i)=>(l(),u(g,{size:e.size,disabled:e.disabled,variant:`primary`,style:r(e.variant===`gradient`?{background:`var(--color-subscription-button-gradient)`,color:`var(--color-white)`}:void 0),class:t(a(h)(`font-bold`,e.fluid&&`w-full`)),onClick:handleSubscribe},{default:c(()=>[n(o(e.label||e.$t(`subscription.required.subscribe`)),1)]),_:1},8,[`size`,`disabled`,`style`,`class`]))}});export{y as t};
//# sourceMappingURL=SubscribeButton-Du80p2tT.js.map