import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import"./vendor-primevue-CIZeDNer.js";import"./vendor-firebase-yTFzdAQf.js";import{A as t,D as n,F as r,Ht as i,I as a,Lt as o,O as s,R as c,S as l,_t as u,et as d,j as f}from"./vendor-vue-core-IZuWV8u3.js";import"./vendor-other-DOjudfJ1.js";import"./useFeatureFlags-Clsy1Hhz.js";import"./api-BoVM1fMt.js";import"./vendor-markdown-th9BvURy.js";import"./colorUtil-CaOYwqZT.js";import"./i18n-CbR4AZxs.js";import"./vendor-reka-ui-NsM8zEZd.js";import{t as p}from"./Button-BonqIZfE.js";import{Ci as m,Ui as h}from"./dialogService-DeXt-oC-.js";import"./extensionStore-B_7jnXF_.js";import"./dialogStore-qTsCyKDB.js";import"./userStore-ClejTuyc.js";import"./useErrorHandling-DSpiCwxA.js";import"./useExternalLink-C6SjfMkA.js";import"./vendor-tiptap-nOCIQysJ.js";import"./markdownRendererUtil-DO0bU-vH.js";import"./Popover-CTWL6O4Q.js";import{t as g}from"./cloud-subscription-YIO4CS_U.js";import{t as _}from"./SubscriptionBenefits-BiHsjQHP.js";var v={class:`relative grid h-full grid-cols-5`},y={class:`col-span-3 flex flex-col justify-between p-8`},b={class:`flex flex-col gap-6`},x={class:`text-sm text-text-primary`},S={key:0,class:`m-0 text-sm text-text-secondary`},C={key:1,class:`m-0 text-sm text-text-secondary`},w={key:2,class:`m-0 text-sm text-text-secondary`},T={class:`flex flex-col pt-8`},E=c({__name:`FreeTierDialogContent`,props:{reason:{}},emits:[`close`,`upgrade`],setup(e){let{formattedRenewalDate:c}=m(),g=n(()=>h(`free`));return(e,n)=>(d(),f(`div`,v,[a(p,{size:`icon`,variant:`muted-textonly`,class:`absolute top-2.5 right-2.5 z-10 size-8 rounded-full p-0 text-white hover:bg-white/20`,"aria-label":e.$t(`g.close`),onClick:n[0]||=t=>e.$emit(`close`,!1)},{default:u(()=>n[2]||=[s(`i`,{class:`pi pi-times`},null,-1)]),_:1},8,[`aria-label`]),n[3]||=s(`div`,{class:`relative col-span-2 flex items-center justify-center overflow-hidden rounded-sm`},[s(`video`,{autoplay:``,loop:``,muted:``,playsinline:``,class:`h-full min-w-[125%] object-cover p-0`,style:{"margin-left":`-20%`}},[s(`source`,{src:``+new URL(`images/cloud-subscription.webm`,import.meta.url).href,type:`video/webm`})])],-1),s(`div`,y,[s(`div`,null,[s(`div`,b,[s(`div`,x,[e.reason===`out_of_credits`?(d(),f(l,{key:0},[r(i(e.$t(`subscription.freeTier.outOfCredits.title`)),1)],64)):e.reason===`top_up_blocked`?(d(),f(l,{key:1},[r(i(e.$t(`subscription.freeTier.topUpBlocked.title`)),1)],64)):(d(),f(l,{key:2},[r(i(e.$t(`subscription.freeTier.title`)),1)],64))]),e.reason===`out_of_credits`?(d(),f(`p`,S,i(e.$t(`subscription.freeTier.outOfCredits.subtitle`)),1)):t(``,!0),!e.reason||e.reason===`subscription_required`?(d(),f(`p`,C,i(g.value?e.$t(`subscription.freeTier.description`,{credits:g.value.toLocaleString()}):e.$t(`subscription.freeTier.descriptionGeneric`)),1)):t(``,!0),(!e.reason||e.reason===`subscription_required`)&&o(c)?(d(),f(`p`,w,i(e.$t(`subscription.freeTier.nextRefresh`,{date:o(c)})),1)):t(``,!0)]),a(_,{"is-free-tier":``,class:`mt-6 text-muted`})]),s(`div`,T,[a(p,{class:`w-full rounded-lg bg-(--color-accent-blue,#0B8CE9) px-4 py-2 font-inter text-sm font-bold text-white hover:bg-(--color-accent-blue,#0B8CE9)/90`,onClick:n[1]||=t=>e.$emit(`upgrade`)},{default:u(()=>[r(i(e.reason===`out_of_credits`||e.reason===`top_up_blocked`?e.$t(`subscription.freeTier.upgradeCta`):e.$t(`subscription.freeTier.subscribeCta`)),1)]),_:1})])])]))}});export{E as default};
//# sourceMappingURL=FreeTierDialogContent-5835fBOX.js.map