import { Check } from 'lucide-react'; import { getPlanCardBullets, getPlanDisplayMeta, getPublicPricingPlansForInterval, type BillingInterval } from '../../shared/billing/plans'; import { Button } from './ui'; import { formatPlanPeriod, formatPlanPrice } from '../lib/billing-ui'; interface PricingCardsProps { billingInterval: Extract; onGoToAuth: (mode: 'sign_in' | 'sign_up') => void; } export function PricingCards({ billingInterval, onGoToAuth }: PricingCardsProps) { const pricingPlans = getPublicPricingPlansForInterval(billingInterval); return (
{pricingPlans.map((plan) => { const display = getPlanDisplayMeta(plan.code); const isFeatured = display.badgeLabel === 'Best Value'; return (

{plan.name}

{display.audience}

{display.badgeLabel ? ( {display.badgeLabel} ) : null}
{formatPlanPrice(plan.priceCents, plan.currencyCode)} {formatPlanPeriod(plan.billingInterval, plan.contactSalesRequired)}

{display.summary}

{getPlanCardBullets(plan.code).map((item) => (
{item}
))}
); })}
); }