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,Vt as o,Y as s,_t as c,et as l,k as u,pt as d,zt as f}from"./vendor-vue-core-IZuWV8u3.js";import{t as p}from"./types-Bc3W4AWd.js";import{t as m}from"./telemetry-B10ff63e.js";import{t as h}from"./src-B0kocU_l.js";import{t as g}from"./Button-uSZXZovG.js";import{vr as _}from"./dialogService-J-k0CeI4.js";var v=a({__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:a}){let v=a,{isActiveSubscription:y,showSubscriptionDialog:b}=_(),x=i(!1);d([x,y],([e,t])=>{p&&e&&t&&(v(`subscribed`),x.value=!1)});let handleSubscribe=()=>{p&&m()?.trackSubscription(`subscribe_clicked`),x.value=!0,b()};return s(()=>{x.value=!1}),(e,i)=>(l(),u(g,{size:e.size,disabled:e.disabled,variant:`primary`,style:o(e.variant===`gradient`?{background:`var(--color-subscription-button-gradient)`,color:`var(--color-white)`}:void 0),class:f(r(h)(`font-bold`,e.fluid&&`w-full`)),onClick:handleSubscribe},{default:c(()=>[t(n(e.label||e.$t(`subscription.required.subscribe`)),1)]),_:1},8,[`size`,`disabled`,`style`,`class`]))}});export{v as t};
//# sourceMappingURL=SubscribeButton-CzLnwhsH.js.map