1import{F as E,j as n,o as O,H as T,q as W,u as M,ac as R,cL as H,am as L,bT as q,dq as N,bQ as G,ce as x,S as i,P as s,T as o,a as e,bu as _,eq as D,aa as S,B as y,bR as C,au as U,d as V,Y as $,cx as A,qq as Y}from"./index-rKXnMT8v.js";import{S as K}from"./index-D5BoGZpy.js";import{C as Q}from"./CreditCard-CNQWKYbG.js";import{E as J}from"./EmailOutlined-Bp8Gpf_Z.js";const X=E([n.jsx("path",{d:"M19.5 3.5 18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2v14H3v3c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V2zM15 20H6c-.55 0-1-.45-1-1v-1h10zm4-1c0 .55-.45 1-1 1s-1-.45-1-1v-3H8V5h11z"},"0"),n.jsx("path",{d:"M9 7h6v2H9zm7 0h2v2h-2zm-7 3h6v2H9zm7 0h2v2h-2z"},"1")],"ReceiptLongOutlined"),Z=()=>O({mutationFn:t=>T.post({path:W.billing,payload:t}),retry:3});function ee(){var m;const t=M(),{canEdit:v}=R(),l=v(H.orgConfig),[w,z]=L(a=>[a.user.id,a.user.organizationId]),{data:c}=q(z),d=(m=c==null?void 0:c.data)==null?void 0:m.paymentTier,{mutate:I,isPending:P}=Z(),{partner:p}=N(),h=(p==null?void 0:p.billingEmail)||"[email protected]",g=G(d??x.customerFreePlan),u=d===x.customerBasicPlan||d===x.customerPlusPlan,k=()=>{const a=window.open($(A.loadingItem,{item:"billing"}),"_blank");I({userId:w,returnUrl:window.location.href},{onSuccess:f=>{var b,j;(b=f.data)!=null&&b.url&&a&&(a.location=(j=f.data)==null?void 0:j.url)}})},B=()=>{window.open(`${Y}/pricing`,"_blank")},F=()=>{window.location.href=`mailto:${h}`},r={padding:e(24),"&.MuiPaper-root":{borderRadius:e(12),borderColor:t.palette.divider}};return n.jsx(K,{title:"Plan & Billing",children:n.jsxs(i,{spacing:e(16),sx:{maxWidth:e(1200),marginInline:"auto",paddingBlock:e(32),paddingInline:{xxxs:e(24),lg:e(32)}},children:[n.jsx(s,{variant:"outlined",sx:{...r,overflow:"hidden",position:"relative",borderColor:S(t.palette.mainFont,.3),"&::before":{content:'""',position:"absolute",left:0,top:0,bottom:0,width:e(4),backgroundColor:t.palette.tertiary1}},children:n.jsx(i,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",children:n.jsxs(i,{spacing:e(8),children:[n.jsxs(i,{direction:"row",alignItems:"center",spacing:e(12),children:[n.jsx(o,{variant:"h4",sx:{fontSize:e(18),fontWeight:600,color:t.palette.mainFont},children:"Current Plan"}),n.jsx(_,{label:g,size:"small",sx:{backgroundColor:t.palette.primary2,color:D(t.palette.primary2,t),fontWeight:600,fontSize:e(12),height:e(24)}})]}),n.jsxs(o,{sx:{fontSize:e(14),color:t.palette.tertiary4},children:["You're currently on the ",g," plan"]})]})})}),n.jsxs(i,{direction:{xs:"column",md:u?"row":"column"},spacing:e(16),sx:{width:"100%"},children:[u&&n.jsx(s,{variant:"outlined",sx:{...r,flex:1,height:"100%"},children:n.jsxs(i,{spacing:e(12),sx:{height:"100%"},children:[n.jsxs(i,{direction:"row",alignItems:"center",spacing:e(10),children:[n.jsx(X,{sx:{fontSize:e(20),color:t.palette.mainFont}}),n.jsx(o,{variant:"h4",sx:{fontSize:e(16),fontWeight:600,color:t.palette.mainFont},children:"Manage Subscription"})]}),n.jsx(o,{sx:{fontSize:e(14),color:t.palette.tertiary4,flex:1},children:"Update your plan, payment method, or cancel your subscription."}),n.jsxs(y,{component:"button",onClick:k,disabled:!l||P,sx:{display:"inline-flex",alignItems:"center",gap:e(4),fontSize:e(14),fontWeight:600,color:t.palette.mainFont,textDecoration:"none",cursor:l?"pointer":"not-allowed",background:"none",border:"none",padding:0,"&:hover":{textDecoration:l?"underline":"none"},"&:disabled":{color:t.palette.action.disabled}},children:["Open Billing Console",n.jsx(C,{sx:{fontSize:e(16)}})]})]})}),n.jsx(s,{variant:"outlined",sx:{...r,flex:1,height:"100%"},children:n.jsxs(i,{spacing:e(12),sx:{height:"100%"},children:[n.jsxs(i,{direction:"row",alignItems:"center",spacing:e(10),children:[n.jsx(Q,{sx:{fontSize:e(20),color:t.palette.mainFont}}),n.jsx(o,{variant:"h4",sx:{fontSize:e(16),fontWeight:600,color:t.palette.mainFont},children:"View Pricing"})]}),n.jsx(o,{sx:{fontSize:e(14),color:t.palette.tertiary4,flex:1},children:"Compare plans and find the best option for your needs."}),n.jsxs(y,{component:"button",onClick:B,sx:{display:"inline-flex",alignItems:"center",gap:e(4),fontSize:e(14),fontWeight:600,color:t.palette.mainFont,textDecoration:"none",cursor:"pointer",background:"none",border:"none",padding:0,"&:hover":{textDecoration:"underline"}},children:["See All Plans",n.jsx(C,{sx:{fontSize:e(16)}})]})]})})]}),n.jsx(s,{variant:"outlined",sx:{...r},children:n.jsxs(i,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:e(16),children:[n.jsxs(i,{spacing:e(8),children:[n.jsxs(i,{direction:"row",alignItems:"center",spacing:e(10),children:[n.jsx(J,{sx:{fontSize:e(20),color:t.palette.mainFont}}),n.jsx(o,{variant:"h4",sx:{fontSize:e(16),fontWeight:600,color:t.palette.mainFont},children:"Need Help with Billing?"})]}
1),n.jsxs(o,{sx:{fontSize:e(14),color:t.palette.tertiary4},children:["Our billing support team is here to help with any questions about your subscription, invoices, or payment methods. Email us at"," ",n.jsx(U,{href:`mailto:${h}`,underline:"always",children:h})," ","for billing support."]})]}),n.jsx(V,{variant:"outlined",onClick:F,sx:{flexShrink:0,borderRadius:e(8),textTransform:"none",fontWeight:600,fontSize:e(14),borderColor:t.palette.divider,color:t.palette.mainFont,"&:hover":{borderColor:t.palette.tertiary4,backgroundColor:S(t.palette.mainFont,.04)}},children:"Contact Billing Support"})]})})]})})}function ae(){return n.jsx(ee,{})}export{ae as default}; 2//# sourceMappingURL=index-BB1Z9SyF.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.