import{a as b}from"./asyncComputed.011464f7.js";import{d as _,e4 as w,J as h,u as e,c as d,K as k,b as o,w as t,F as C,o as n,d6 as f,az as l,eb as I,bM as x,da as c,a as z}from"./index.fc2932f8.js";import"./gateway.95c466eb.js";import{a as N}from"./organization.2394bf77.js";import"./columns.92249f00.js";import{C as g}from"./router.1cd98f72.js";import{L as v}from"./LoadingContainer.757334c6.js";import{A as B}from"./index.bfa5cdbc.js";import"./popupNotifcation.ca0d7c69.js";import"./record.04f0d9bc.js";import"./string.bba51802.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]="0f6b4007-8431-4c98-a4bb-12b1b4c85075",a._sentryDebugIdIdentifier="sentry-dbid-0f6b4007-8431-4c98-a4bb-12b1b4c85075")}catch{}})();const D={key:1},U=["src"],O=_({__name:"Billing",setup(a){const p=w().params.organizationId,{loading:m,result:r}=b(async()=>{const i=await N.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(m)?(n(),d(v,{key:0})):e(r)?(n(),k("div",D,[o(e(c),{justify:"space-between",align:"center"},{default:t(()=>[o(e(f),{level:3},{default:t(()=>[l("Current plan: "+I(e(r).organization.coalescedPlan),1)]),_:1}),o(e(x),{type:"primary",onClick:y},{default:t(()=>[l("Upgrade")]),_:1})]),_:1}),o(e(B),{style:{"margin-top":"0"}}),e(r).organization.hasUsageReport?(n(),d(e(c),{key:0,align:"center",justify:"center"},{default:t(()=>[z("iframe",{src:e(r).reportUrl,frameborder:"0",style:{width:"1000px",height:"1700px"}},null,8,U)]),_:1})):(n(),d(e(c),{key:1,align:"center",justify:"center"},{default:t(()=>[o(e(f),{level:4},{default:t(()=>[l("No usage report available")]),_:1})]),_:1}))])):C("",!0)}});export{O as default};
//# sourceMappingURL=Billing.d362df29.js.map
