import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import"./vendor-primevue-DGevbYGF.js";import"./vendor-firebase-yTFzdAQf.js";import{A as t,D as n,F as r,I as i,O as a,R as o,Rt as s,S as c,Ut as l,_t as u,et as d,j as f}from"./vendor-vue-core-BdhYaYlO.js";import"./vendor-other-D9HJWI2D.js";import"./useFeatureFlags-DLStzqlx.js";import"./api-C1WIrB4Z.js";import"./vendor-markdown-th9BvURy.js";import"./colorUtil-DJbZtU1U.js";import"./i18n-DKtnmyh4.js";import"./vendor-reka-ui-CSo89nDv.js";import{t as p}from"./Button-DHxPjNdi.js";import{Zr as m,_i as h}from"./dialogService-CwVeD8j9.js";import"./extensionStore-By6c6sCD.js";import"./userStore-ChcnLOkA.js";import"./useErrorHandling-CWU_3R6Y.js";import"./useExternalLink-DZBh_BZs.js";import"./vendor-tiptap-BZHcjrm1.js";import"./markdownRendererUtil-J4WlXR5e.js";import"./Popover-_oREh-V5.js";import{n as g,t as _}from"./SubscriptionBenefits-BZLzQLNw.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=o({__name:`FreeTierDialogContent`,props:{reason:{}},emits:[`close`,`upgrade`],setup(e){let{formattedRenewalDate:o}=m(),g=n(()=>h(`free`));return(e,n)=>(d(),f(`div`,v,[i(p,{size:`icon`,variant:`muted-textonly`,class:`rounded-full absolute top-2.5 right-2.5 z-10 h-8 w-8 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]||=[a(`i`,{class:`pi pi-times`},null,-1)]),_:1},8,[`aria-label`]),n[3]||=a(`div`,{class:`relative col-span-2 flex items-center justify-center overflow-hidden rounded-sm`},[a(`video`,{autoplay:``,loop:``,muted:``,playsinline:``,class:`h-full min-w-[125%] object-cover p-0`,style:{"margin-left":`-20%`}},[a(`source`,{src:``+new URL(`images/cloud-subscription.webm`,import.meta.url).href,type:`video/webm`})])],-1),a(`div`,y,[a(`div`,null,[a(`div`,b,[a(`div`,x,[e.reason===`out_of_credits`?(d(),f(c,{key:0},[r(l(e.$t(`subscription.freeTier.outOfCredits.title`)),1)],64)):e.reason===`top_up_blocked`?(d(),f(c,{key:1},[r(l(e.$t(`subscription.freeTier.topUpBlocked.title`)),1)],64)):(d(),f(c,{key:2},[r(l(e.$t(`subscription.freeTier.title`)),1)],64))]),e.reason===`out_of_credits`?(d(),f(`p`,S,l(e.$t(`subscription.freeTier.outOfCredits.subtitle`)),1)):t(``,!0),!e.reason||e.reason===`subscription_required`?(d(),f(`p`,C,l(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`)&&s(o)?(d(),f(`p`,w,l(e.$t(`subscription.freeTier.nextRefresh`,{date:s(o)})),1)):t(``,!0)]),i(_,{"is-free-tier":``,class:`mt-6 text-muted`})]),a(`div`,T,[i(p,{class:`w-full rounded-lg bg-[var(--color-accent-blue,#0B8CE9)] px-4 py-2 font-inter text-sm font-bold text-white hover:bg-[var(--color-accent-blue,#0B8CE9)]/90`,onClick:n[1]||=t=>e.$emit(`upgrade`)},{default:u(()=>[r(l(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-YhEa7R5C.js.map