import{o as e,r as s}from"./rolldown-runtime-iuO8RvI4.js";import{At as t}from"./vendor-all-0-fRSUBfCr.js";import{Ll as a}from"./shared-0-C4kdVF7Y.js";import{Mi as o,ki as i}from"./vendor-frame-CwiylG4Y.js";import{Q as r,Rf as d,Z as n}from"./shared-1-3-6x7RKF.js";import{nn as l}from"./vendor-all-2-BJdkbLSj.js";import{Do as u}from"./shared-4-6CEyRAHb.js";import{t as m}from"./ced1eadef-DRPdlTWz.js";var p=s({MobileOveragesPaymentSetupModal:()=>c}),h=e(o()),g=i();function c({isOpen:e,onClose:s,onComplete:o,returnPath:i="/settings/usage"}){const p=t(),{activeOrganization:c}=a(),b=(0,h.useMemo)(()=>"apple_subscription"===c?.billing_type?(0,g.jsx)(l,{defaultMessage:"Your subscription is billed through Apple. To keep using Claude when you hit a limit, add a payment method.",id:"bLtw7Ag5MH"}):"google_play_subscription"===c?.billing_type?(0,g.jsx)(l,{defaultMessage:"Your subscription is billed through Google. To keep using Claude when you hit a limit, add a payment method.",id:"dKhnIF3iKx"}):(0,g.jsx)(l,{defaultMessage:"Your subscription is billed through a mobile provider. To keep using Claude when you hit a limit, add a payment method.",id:"rrzOGn51kv"}),[c?.billing_type]),y=(0,h.useCallback)(e=>{e&&(p.setQueryData([n,c?.uuid],e),p.setQueryData(r(c?.uuid,{noToast:!0}),e)),o()},[p,c?.uuid,o]);return(0,g.jsxs)(d,{...u(),isOpen:e,onClose:s,modalSize:"lg",title:(0,g.jsx)(l,{defaultMessage:"Add a payment method",id:"AiQP5MqFFV"}),hasCloseButton:!0,children:[(0,g.jsx)("p",{className:"text-text-100",children:b}),(0,g.jsx)("p",{className:"mb-4 mt-2 text-sm text-text-300",children:(0,g.jsx)(l,{defaultMessage:"Your card won\u2019t be charged unless you choose to purchase additional usage.",id:"ddyUeRDqPm"})}),(0,g.jsx)(m,{action:"setup-mobile-subscriber-stripe-payments",product:"overages",returnPath:i,onPaymentMethodUpdated:y,onCancel:s})]})}export{p as n,c as t};