import { X } from 'lucide-react'; import { PricingCard } from '@archer/ui/components'; import { mapDbPlanToCard } from '@archer/ui/utils'; import type { AvailablePlanResponse } from '@/infrastructure/http/api/subscription'; import type { MappedPricingPlan } from '@archer/ui/utils'; import { useTranslation } from '@/i18n/TranslationProvider'; interface PlanSelectionModalProps { plans: AvailablePlanResponse[]; currentPlanId?: string; pendingPlanId?: string; /** Account's billing currency — drives the price shown on every card. */ preferredCurrency?: string | null; onSelect: (mapped: MappedPricingPlan) => void; onClose: () => void; } export function PlanSelectionModal({ plans, currentPlanId, pendingPlanId, preferredCurrency, onSelect, onClose, }: PlanSelectionModalProps) { const { t, locale } = useTranslation(); return ( <> {/* Backdrop */}
{/* Modal */}{t('subscription.choosePlan')}