import{a as _}from"./asyncComputed.4467697c.js";import{d as w,ea as b,X as h,u as e,o as n,c as d,Y as k,b as o,w as t,S as C,dd as m,aG as c,e9 as I,bT as x,dh as l,a as N}from"./index.b466b20d.js";import"./gateway.973a0055.js";import{a as v}from"./organization.43dd96a4.js";import"./tables.1fa225bd.js";import{C as g}from"./router.3cd4b4c4.js";import{L as z}from"./LoadingContainer.b1338719.js";import{A as B}from"./index.bd1de956.js";import"./popupNotifcation.d1201e83.js";import"./record.fd6fbc29.js";import"./string.42378387.js";import"./Badge.4eadbb30.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="096b8cdc-86d1-4785-83ad-aa839b2414c2",a._sentryDebugIdIdentifier="sentry-dbid-096b8cdc-86d1-4785-83ad-aa839b2414c2")}catch{}})();const D={key:1},U=["src"],P=w({__name:"Billing",setup(a){const p=b().params.organizationId,{loading:f,result:r}=_(async()=>{const i=await v.get(p),u=await i.getUsageReportUrl();return{organization:i,reportUrl:u}});h(()=>{location.search.includes("upgrade")&&g.showNewMessage("I want to upgrade my plan")});const y=()=>g.showNewMessage("I want to upgrade my plan");return(i,u)=>e(f)?(n(),d(z,{key:0})):e(r)?(n(),k("div",D,[o(e(l),{justify:"space-between",align:"center"},{default:t(()=>[o(e(m),{level:3},{default:t(()=>[c("Current plan: "+I(e(r).organization.coalescedPlan),1)]),_:1}),o(e(x),{type:"primary",onClick:y},{default:t(()=>[c("Upgrade")]),_:1})]),_:1}),o(e(B),{style:{"margin-top":"0"}}),e(r).organization.hasUsageReport?(n(),d(e(l),{key:0,align:"center",justify:"center"},{default:t(()=>[N("iframe",{src:e(r).reportUrl,frameborder:"0",style:{width:"1000px",height:"1700px"}},null,8,U)]),_:1})):(n(),d(e(l),{key:1,align:"center",justify:"center"},{default:t(()=>[o(e(m),{level:4},{default:t(()=>[c("No usage report available")]),_:1})]),_:1}))])):C("",!0)}});export{P as default};
//# sourceMappingURL=Billing.13deb112.js.map
