import"./rolldown-runtime-DIIn1E2Q.js";import"./vendor-primevue-BDZ_jj__.js";import"./vendor-firebase-D7u00oy9.js";import{A as e,D as t,F as n,I as r,O as i,R as a,Rt as o,S as s,Ut as c,_t as l,et as u,j as d}from"./vendor-vue-core-DO0afONr.js";import"./vendor-other-CiPV8GBG.js";import"./useFeatureFlags-CeS8LuDc.js";import"./api-Cw7jP9TY.js";import"./vendor-markdown-Da9QPS2x.js";import"./colorUtil-Bsa2N3Sq.js";import"./i18n-CF_88JEG.js";import"./vendor-reka-ui-B53kLmAc.js";import{t as f}from"./Button-Ca3rDegY.js";import{Pi as p,ea as m}from"./dialogService-CfgsFapJ.js";import"./formatUtil-CeKPWstn.js";import"./dialogStore-G2juoay4.js";import"./userStore-Czt6jT20.js";import"./useErrorHandling-DXaBpHI1.js";import"./extensionStore-MnMxnUwx.js";import"./useExternalLink-BItqlDxr.js";import"./vendor-tiptap-Bk1lVUYZ.js";import"./markdownRendererUtil-_EbNpPBW.js";import"./Popover-CXKWNrM3.js";import"./electronDownloadStore-DudKQmD7.js";import"./cloud-subscription-Ohc_ectq.js";import{t as h}from"./SubscriptionBenefits-AQUTEUkF.js";var g={class:`relative grid h-full grid-cols-5`},_={class:`col-span-3 flex flex-col justify-between p-8`},v={class:`flex flex-col gap-6`},y={class:`text-sm text-text-primary`},b={key:0,class:`m-0 text-sm text-text-secondary`},x={key:1,class:`m-0 text-sm text-text-secondary`},S={key:2,class:`m-0 text-sm text-text-secondary`},C={class:`flex flex-col pt-8`},w=a({__name:`FreeTierDialogContent`,props:{reason:{}},emits:[`close`,`upgrade`],setup(a){let{formattedRenewalDate:w}=p(),T=t(()=>m(`free`));return(t,a)=>(u(),d(`div`,g,[r(f,{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":t.$t(`g.close`),onClick:a[0]||=e=>t.$emit(`close`,!1)},{default:l(()=>a[2]||=[i(`i`,{class:`pi pi-times`},null,-1)]),_:1},8,[`aria-label`]),a[3]||=i(`div`,{class:`relative col-span-2 flex items-center justify-center overflow-hidden rounded-sm`},[i(`video`,{autoplay:``,loop:``,muted:``,playsinline:``,class:`h-full min-w-[125%] object-cover p-0`,style:{"margin-left":`-20%`}},[i(`source`,{src:``+new URL(`images/cloud-subscription.webm`,import.meta.url).href,type:`video/webm`})])],-1),i(`div`,_,[i(`div`,null,[i(`div`,v,[i(`div`,y,[t.reason===`out_of_credits`?(u(),d(s,{key:0},[n(c(t.$t(`subscription.freeTier.outOfCredits.title`)),1)],64)):t.reason===`top_up_blocked`?(u(),d(s,{key:1},[n(c(t.$t(`subscription.freeTier.topUpBlocked.title`)),1)],64)):(u(),d(s,{key:2},[n(c(t.$t(`subscription.freeTier.title`)),1)],64))]),t.reason===`out_of_credits`?(u(),d(`p`,b,c(t.$t(`subscription.freeTier.outOfCredits.subtitle`)),1)):e(``,!0),!t.reason||t.reason===`subscription_required`?(u(),d(`p`,x,c(T.value?t.$t(`subscription.freeTier.description`,{credits:T.value.toLocaleString()}):t.$t(`subscription.freeTier.descriptionGeneric`)),1)):e(``,!0),(!t.reason||t.reason===`subscription_required`)&&o(w)?(u(),d(`p`,S,c(t.$t(`subscription.freeTier.nextRefresh`,{date:o(w)})),1)):e(``,!0)]),r(h,{"is-free-tier":``,class:`mt-6 text-muted`})]),i(`div`,C,[r(f,{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:a[1]||=e=>t.$emit(`upgrade`)},{default:l(()=>[n(c(t.reason===`out_of_credits`||t.reason===`top_up_blocked`?t.$t(`subscription.freeTier.upgradeCta`):t.$t(`subscription.freeTier.subscribeCta`)),1)]),_:1})])])]))}});export{w as default};
//# sourceMappingURL=FreeTierDialogContent-BUCXmFFL.js.map