import React from 'react'; import { CreditCard, Download } from 'lucide-react'; import { Button, Panel, StatusBadge, UsageMeter } from '../../ui'; import { useBilling } from '../../../hooks/usePlanUsage'; import { useSetIsUpgradeModalOpen } from '../../../contexts/UIContext'; import { manageSubscription, updatePaymentMethod } from '../../../featureStubs'; const BillingSettingsSection: React.FC = () => { const billing = useBilling(); const openUpgrade = useSetIsUpgradeModalOpen(); const isPro = billing.plan === 'pro'; const { paymentMethod, invoices } = billing; return (
{/* Current plan */}

{isPro ? 'Pro' : 'Free'} plan

{billing.priceLabel}

{isPro ? `Renews ${billing.renewsAt}.` : `Usage resets ${billing.renewsAt}.`}

{isPro ? ( ) : ( )}
{/* Usage credits */}

Usage credits

{billing.credits.toLocaleString()} credits remaining

{/* Payment method */}

Payment method

{paymentMethod ? `${paymentMethod.brand} •••• ${paymentMethod.last4} · Exp ${paymentMethod.expMonth}/${paymentMethod.expYear}` : 'No payment method on file'}

{/* Billing history */} {invoices.length > 0 && (

Billing history

)}

Billing isn’t live yet — this previews the upcoming plans, credits & invoices UI.

); }; export default BillingSettingsSection;