import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{$ as t,Bt as n,Et as r,Ft as i,J as a,L as o,Lt as s,O as c,P as l,ft as u,ht as d,zt as f}from"./vendor-vue-core-D3IvUUeM.js";import{t as p}from"./types-BW--Ya-K.js";import{t as m}from"./telemetry-C4UotafO.js";import{t as h}from"./src-BgNAoJFr.js";import{t as g}from"./Button-CJj3KtkO.js";import{sn as _}from"./dialogService-Daa_oID7.js";var v=o({__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:o}){let v=o,{isActiveSubscription:y,showSubscriptionDialog:b}=_(),x=r(!1);u([x,y],([e,t])=>{p&&e&&t&&(v(`subscribed`),x.value=!1)});let handleSubscribe=()=>{p&&m()?.trackSubscription(`subscribe_clicked`),x.value=!0,b()};return a(()=>{x.value=!1}),(e,r)=>(t(),c(g,{size:e.size,disabled:e.disabled,variant:`primary`,style:f(e.variant===`gradient`?{background:`var(--color-subscription-button-gradient)`,color:`var(--color-white)`}:void 0),class:s(i(h)(`font-bold`,e.fluid&&`w-full`)),onClick:handleSubscribe},{default:d(()=>[l(n(e.label||e.$t(`subscription.required.subscribe`)),1)]),_:1},8,[`size`,`disabled`,`style`,`class`]))}});export{v as t};
//# sourceMappingURL=SubscribeButton-B2fQBrWa.js.map