'use client'; import { forwardRef, HTMLAttributes } from 'react'; export interface PricingTier { name: string; price: number | string; currency?: string; period?: string; features: string[]; featured?: boolean; featuredLabel?: string; buttonText?: string; onSelect?: () => void; } export interface TowerPricingProps extends HTMLAttributes { tiers: PricingTier[]; variant?: 'gold' | 'blood' | 'cyan' | 'bone'; showConnectors?: boolean; } const variantStyles = { gold: { accent: 'text-amber-600', border: 'border-amber-600', bg: 'bg-amber-600', hoverBg: 'hover:bg-amber-600/5' }, blood: { accent: 'text-red-800', border: 'border-red-800', bg: 'bg-red-800', hoverBg: 'hover:bg-red-800/5' }, cyan: { accent: 'text-cyan-400', border: 'border-cyan-400', bg: 'bg-cyan-400', hoverBg: 'hover:bg-cyan-400/5' }, bone: { accent: 'text-stone-400', border: 'border-stone-400', bg: 'bg-stone-400', hoverBg: 'hover:bg-stone-400/5' }, }; export const TowerPricing = forwardRef( ({ tiers, variant = 'gold', showConnectors = false, className = '', ...props }, ref) => { const colors = variantStyles[variant]; return (
{tiers.map((tier, index) => (
{tier.featured && ( <>
{tier.featuredLabel && ( {tier.featuredLabel} )} )}
{tier.name}
{tier.currency || '$'} {tier.price} {tier.period && /{tier.period}}
    {tier.features.map((feature, i) => (
  • {feature}
  • ))}
{showConnectors && index < tiers.length - 1 && ( )}
))}
); } ); TowerPricing.displayName = 'TowerPricing'; export default TowerPricing;