import{o as e}from"./rolldown-runtime-iuO8RvI4.js";import{Ll as s,Tu as r,Vm as a,Wd as t}from"./shared-0-C4kdVF7Y.js";import{Mi as i,ki as d}from"./vendor-frame-CwiylG4Y.js";import{Zt as n,nn as o}from"./vendor-all-2-BJdkbLSj.js";import{R as l}from"./shared-frame-DbQbH4Yr.js";import{rl as c}from"./shared-5-UQAFGbWu.js";import{nr as m}from"./shared-7-VxUxSmVa.js";import{A as x,j as u}from"./shared-18-C5QwAjwU.js";var f=e(i()),h=d(),j=(0,f.memo)(({onDismiss:e,onAction:s})=>{const{data:r,isLoading:i}=a("/api/account/standing",{queryKey:[t]});if(i||!r)return null;const d=r.reinstatement_credit_cents??0;return d<=0?null:(0,h.jsx)(x,{onDismiss:e,onAction:s,maxWidth:560,modalClassName:"!p-0",render:({handleDismiss:e,handleAction:s})=>(0,h.jsx)(p,{standing:r,creditCents:d,handleDismiss:e,handleAction:s})})});function p({standing:e,creditCents:a,handleDismiss:t,handleAction:i}){const{activeOrganization:d}=s(),c=(d?.capabilities??[]).some(e=>["claude_pro","claude_max"].includes(e)),m=(0,h.jsx)(n,{value:a/100,style:"currency",currency:e.reinstatement_credit_currency??"USD",minimumFractionDigits:0,maximumFractionDigits:0}),x=r();return(0,h.jsxs)("div",{className:"flex flex-col",children:[(0,h.jsxs)("div",{className:"flex flex-col overflow-hidden sm:flex-row",children:[(0,h.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col p-7",children:[(0,h.jsx)(u,{className:"font-heading text-text-000 mb-4",children:(0,h.jsx)(o,{defaultMessage:"Your account is back, with {credit} on us",id:"tMa1K2yQ90",values:{credit:m}})}),(0,h.jsx)("p",{className:"text-text-200 mb-3 text-sm",children:(0,h.jsx)(o,{defaultMessage:"We reviewed your account and removed the hold. Thanks for your patience, and sorry for the time it cost you.",id:"fy+lnSL5QY"})}),(0,h.jsx)("p",{className:"text-text-200 mb-3 text-sm",children:(0,h.jsx)(o,{defaultMessage:"We\u2019ve credited {credit} to your next billing cycle on us.",id:"twMJa6l3Lh",values:{credit:m}})}),(0,h.jsx)("p",{className:"text-text-400 mt-auto pt-4 text-xs",children:(0,h.jsx)(o,{defaultMessage:"Anthropic team",id:"GAIsvleakL"})})]}),(0,h.jsx)(v,{})]}),(0,h.jsx)("div",{className:"border-border-300 flex justify-center gap-3 border-t p-5",children:c?(0,h.jsx)(l,{variant:"primary",onClick:()=>{t()},children:(0,h.jsx)(o,{defaultMessage:"Got it",id:"NYTGIbSNz5"})}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(l,{variant:"secondary",onClick:()=>{t()},children:(0,h.jsx)(o,{defaultMessage:"Continue for free",id:"V/2dOOWlyn"})}),(0,h.jsx)(l,{variant:"primary",onClick:()=>{i({cta:"restart"}),x.push("/upgrade?from=appeals_restored")},children:(0,h.jsx)(o,{defaultMessage:"Restart with {credit} off",id:"ZD2tIbi7L+",values:{credit:m}})})]})})]})}function v(){return(0,h.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:[(0,h.jsx)(c,{asset:m,size:"md"}),(0,h.jsxs)("div",{className:"mt-auto flex w-full flex-col gap-3",children:[(0,h.jsx)("div",{className:"border-border-300 border-t"}),(0,h.jsx)("div",{className:"border-border-300 border-t"}),(0,h.jsx)("div",{className:"border-border-300 border-t"})]})]})}export{j as AppealsRestoredSpotlight};