import type { ReactNode } from 'react'; import type { BillingPageProps } from './types.js'; const statusColors: Record = { active: 'var(--color-success, #16a34a)', trialing: 'var(--color-warning, #d97706)', past_due: 'var(--color-destructive, #dc2626)', canceled: 'var(--color-muted-foreground, #6b7280)', }; export function BillingPage({ currentPlan = 'Free', status = 'active', trialEndsAt, onManageBilling, plans = [], }: BillingPageProps): ReactNode { return (

Billing

{/* Current plan card */}
Current Plan
{currentPlan}
{status.replace('_', ' ')}
{trialEndsAt && (
Trial ends: {trialEndsAt}
)} {onManageBilling && ( )}
{/* Plan comparison */} {plans.length > 0 && (

Available Plans

{plans.map(plan => (
{plan.name}
{plan.price}
    {plan.features.map(f => (
  • ✓ {f}
  • ))}
{plan.current && (
Current Plan
)}
))}
)}
); }