import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{Bt as t,Dt as n,F as r,It as i,R as a,Rt as o,Vt as s,Y as c,et as l,gt as u,k as d,pt as f}from"./vendor-vue-core-X6q-rGJs.js";import{t as p}from"./types-DW97iHDr.js";import{t as m}from"./telemetry-KciZP3tz.js";import{t as h}from"./src-Bx0QZVd-.js";import{t as g}from"./Button-C7dWyQyS.js";import{ln as _}from"./dialogService-Cqui0UMO.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=n(!1);f([x,y],([e,t])=>{p&&e&&t&&(v(`subscribed`),x.value=!1)});let handleSubscribe=()=>{p&&m()?.trackSubscription(`subscribe_clicked`),x.value=!0,b()};return c(()=>{x.value=!1}),(e,n)=>(l(),d(g,{size:e.size,disabled:e.disabled,variant:`primary`,style:t(e.variant===`gradient`?{background:`var(--color-subscription-button-gradient)`,color:`var(--color-white)`}:void 0),class:o(i(h)(`font-bold`,e.fluid&&`w-full`)),onClick:handleSubscribe},{default:u(()=>[r(s(e.label||e.$t(`subscription.required.subscribe`)),1)]),_:1},8,[`size`,`disabled`,`style`,`class`]))}});export{v as t};
//# sourceMappingURL=SubscribeButton-DljwtWX9.js.map