import{r as e}from"./rolldown-runtime-iuO8RvI4.js";import{ki as o}from"./vendor-frame-CwiylG4Y.js";import{nn as n}from"./vendor-all-2-BJdkbLSj.js";import{w as r}from"./shared-frame-DbQbH4Yr.js";import{Qi as a}from"./shared-4-6CEyRAHb.js";import{t as s}from"./cfb7b725b-B9Shn6WR.js";import{n as i}from"./c66328a02-DNiR1l6P.js";var t=e({AutoReloadModal:()=>d}),l=o();function d({isOpen:e,onClose:o,onSave:t,currentEnabled:d=!1,currentAmount:u,currentThreshold:m,onBack:j}){const p=a(),c=e=>{e&&t&&t(e),o()},h=d?(0,l.jsx)(n,{defaultMessage:"Adjust auto-reload",id:"lmMQUEPXAt"}):(0,l.jsx)(n,{defaultMessage:"Turn on auto-reload?",id:"ndHvajCZ0O"});return(0,l.jsx)(r.Root,{open:e,onOpenChange:e=>!e&&o(),children:j?(0,l.jsx)(i,{onBack:j,title:h,children:(0,l.jsx)(s,{onComplete:c,onSkip:o,isEnabled:d,initialAmount:u,initialThreshold:m})}):(0,l.jsxs)(r.Popup,{size:"md",children:[(0,l.jsx)(r.Header,{description:p?(0,l.jsx)(n,{defaultMessage:"You can automatically buy more extra usage when you run low.",id:"+XRRgmkPyP"}):(0,l.jsx)(n,{defaultMessage:"Automatically buy more usage credits when you\u2019re running low.",id:"Z6oYpvXRjf"}),children:h}),(0,l.jsx)(s,{onComplete:c,onSkip:o,isEnabled:d,initialAmount:u,initialThreshold:m,hideDescription:!0})]})})}export{t as n,d as t};