import{r as e,j as s}from"./vendor-react-AXa6hZO5.js";import{q as r,A as t,b as i,a,B as o}from"./cec18ad9a-DiLjrOUd.js";import{S as d,ak as n}from"./index-C_tZnXTW.js";import{F as c,M as l}from"./vendor-intl-BdADXLLt.js";import{T as m}from"./vendor-radix-glKlawmm.js";import"./vendor-zod-CMvj0_Fd.js";import"./vendor-zustand-CcZsBpBq.js";import"./vendor-icons-Dy3Nea9p.js";import"./vendor-lodash-BKAXkXVe.js";import"./vendor-motion-0BJMgYoH.js";import"./vendor-infra-CFC-WJ8N.js";import"./vendor-router-BSYVf8By.js";import"./vendor-query-D7SPXjZv.js";import"./vendor-growthbook-XJcBFzji.js";import"./cdd5b9598-juLasKsB.js";import"./c2591c98b-9UrrTnB9.js";import"./vendor-luxon-D0OkDiyb.js";import"./c51f8bc6d-BS9P5nN1.js";import"./tree-sitter-BFuuT2ac.js";const x=e.memo(({onDismiss:e,onAction:i})=>{const{data:a,isLoading:o}=r("/api/account/standing",{queryKey:[t]});if(o||!a)return null;const n=a.reinstatement_credit_cents??0;return n<=0?null:s.jsx(d,{onDismiss:e,onAction:i,maxWidth:560,modalClassName:"!p-0",render:({handleDismiss:e,handleAction:r})=>s.jsx(j,{standing:a,creditCents:n,handleDismiss:e,handleAction:r})})});function j({standing:e,creditCents:r,handleDismiss:t,handleAction:d}){const{activeOrganization:n}=i(),x=(n?.capabilities??[]).some(e=>["claude_pro","claude_max"].includes(e)),j=s.jsx(c,{value:r/100,style:"currency",currency:e.reinstatement_credit_currency??"USD",minimumFractionDigits:0,maximumFractionDigits:0}),p=a();return s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"flex flex-col overflow-hidden sm:flex-row",children:[s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col p-7",children:[s.jsx(m,{asChild:!0,children:s.jsx("h1",{className:"font-heading text-text-000 mb-4 text-2xl",children:s.jsx(l,{defaultMessage:"Your account is back, with {credit} on us",id:"tMa1K2yQ90",values:{credit:j}})})}),s.jsx("p",{className:"text-text-200 mb-3 text-sm",children:s.jsx(l,{defaultMessage:"We reviewed your account and removed the hold. Thanks for your patience, and sorry for the time it cost you.",id:"fy+lnSL5QY"})}),s.jsx("p",{className:"text-text-200 mb-3 text-sm",children:s.jsx(l,{defaultMessage:"We've credited {credit} to your next billing cycle on us.",id:"BU+rc742ra",values:{credit:j}})}),s.jsx("p",{className:"text-text-400 mt-auto pt-4 text-xs",children:s.jsx(l,{defaultMessage:"Anthropic team",id:"GAIsvleakL"})})]}),s.jsx(u,{})]}),s.jsx("div",{className:"border-border-300 flex justify-center gap-3 border-t p-5",children:x?s.jsx(o,{variant:"primary",onClick:()=>{t()},children:s.jsx(l,{defaultMessage:"Got it",id:"NYTGIbSNz5"})}):s.jsxs(s.Fragment,{children:[s.jsx(o,{variant:"secondary",onClick:()=>{t()},children:s.jsx(l,{defaultMessage:"Continue for free",id:"V/2dOOWlyn"})}),s.jsx(o,{variant:"primary",onClick:()=>{d({cta:"restart"}),p.push("/upgrade?from=appeals_restored")},children:s.jsx(l,{defaultMessage:"Restart with {credit} off",id:"ZD2tIbi7L+",values:{credit:j}})})]})})]})}function u(){return s.jsxs("div",{"aria-hidden":"true",className:"border-border-300 hidden w-[180px] shrink-0 flex-col items-end gap-6 border-l p-7 sm:flex",children:[s.jsx(n,{size:"medium"}),s.jsxs("div",{className:"mt-auto flex w-full flex-col gap-3",children:[s.jsx("div",{className:"border-border-300 border-t"}),s.jsx("div",{className:"border-border-300 border-t"}),s.jsx("div",{className:"border-border-300 border-t"})]})]})}x.displayName="AppealsRestoredSpotlight";export{x as AppealsRestoredSpotlight};
