import{u as o}from"./Toast-BCiCoRuZ.js";import{t as r,u as i}from"./trpc-CA8DNCo7.js";const d=r.stripe.options.useSuspenseQuery,u=()=>{const n=i("ending trial"),{addToast:e}=o();return r.stripe.endTrial.useMutation({onError:n,onSuccess:t=>{if(t==="active"||t==="trialing")return e({title:"Trial ended",content:"Your trial has ended and your card has been charged. Use the billing portal to access your invoice. The page will refresh in 5 seconds to reflect the change.",intent:"success",id:"trial-ended",duration:1e4}),setTimeout(()=>{window.location.reload()},5e3);e({title:"Further action required to end trial",content:"We attempted to end your trial, but your card has not been charged. Please use the billing portal to update your payment method and access your invoice.",intent:"info",id:"trial-ended-incomplete",duration:1e4})}})};export{u as a,d as u};
