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