import React from 'react'; import { Card, CardContent, Typography, Button, Box, Chip, List, ListItem, ListItemIcon, ListItemText } from '@mui/material'; import CheckCircleIcon from '@mui/icons-material/CheckCircle'; import type { SubscriptionPlan, BillingCycle } from '../types/subscription.types'; interface TierCardProps { plan: SubscriptionPlan; billingCycle: BillingCycle; currentTier?: string; isLoading?: boolean; onUpgrade: () => void; } export const TierCard: React.FC = ({ plan, billingCycle, currentTier, isLoading = false, onUpgrade, }) => { const isCurrent = currentTier === plan.tier; const price = billingCycle === 'monthly' ? plan.monthlyPrice : plan.yearlyPrice; const priceLabel = billingCycle === 'monthly' ? '/month' : '/year'; return ( {isCurrent && ( )} {plan.name} ${price.toFixed(2)} {priceLabel} {plan.features.map((feature, index) => ( ))} {isCurrent ? ( ) : ( )} ); };