import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{F as t,Ht as n,Lt as r,Ot as i,R as a,Y as o,_t as s,et as c,k as l,pt as u,zt as d}from"./vendor-vue-core-IZuWV8u3.js";import{t as f}from"./types-Bc3W4AWd.js";import{t as p}from"./telemetry-B10ff63e.js";import{t as m}from"./src-B6n4nS3q.js";import{t as h}from"./Button-BonqIZfE.js";import{Ci as g,xi as _}from"./dialogService-DeXt-oC-.js";var v=a({__name:`SubscribeButton`,props:{label:{},size:{default:`lg`},buttonVariant:{default:`default`},fluid:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:[`subscribed`],setup(e,{emit:a}){let v=a,{isActiveSubscription:y,showSubscriptionDialog:b}=_(),{subscriptionTier:x}=g(),S=i(!1);u([S,y],([e,t])=>{f&&e&&t&&(v(`subscribed`),S.value=!1)});let handleSubscribe=()=>{f&&p()?.trackSubscription(`subscribe_clicked`,{current_tier:x.value?.toLowerCase()}),S.value=!0,b()};return o(()=>{S.value=!1}),(e,i)=>(c(),l(h,{size:e.size,disabled:e.disabled,variant:e.buttonVariant===`gradient`?`gradient`:`primary`,class:d(r(m)(`font-bold`,e.fluid&&`w-full`)),onClick:handleSubscribe},{default:s(()=>[t(n(e.label||e.$t(`subscription.required.subscribe`)),1)]),_:1},8,[`size`,`disabled`,`variant`,`class`]))}});export{v as t};
//# sourceMappingURL=SubscribeButton-Q_WmZn-F.js.map