import { CheckCircle2, Clock, Star } from 'lucide-react'; import { Badge } from '@/ui/Badge'; import { Box } from '@/ui/Box'; import { Button } from '@/ui/Button'; import { Card } from '@/ui/Card'; import { Heading } from '@/ui/Heading'; import { Icon } from '@/ui/Icon'; import { Link } from '@/ui/Link'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; interface AvailableLeague { id: string; name: string; game: string; drivers: number; avgViewsPerRace: number; mainSponsorSlot: { available: boolean; price: number }; secondarySlots: { available: number; total: number; price: number }; rating: number; tier: 'premium' | 'standard' | 'starter'; nextRace?: string; seasonStatus: 'active' | 'upcoming' | 'completed'; description: string; formattedAvgViews: string; formattedCpm: string; } interface AvailableLeagueCardProps { league: AvailableLeague; } export function AvailableLeagueCard({ league }: AvailableLeagueCardProps) { const tierConfig = { premium: { icon: '⭐', label: 'Premium' }, standard: { icon: '🏆', label: 'Standard' }, starter: { icon: '🚀', label: 'Starter' }, }; const statusConfig = { active: { color: 'text-performance-green', bgColor: 'bg-performance-green/10', label: 'Active Season' }, upcoming: { color: 'text-warning-amber', bgColor: 'bg-warning-amber/10', label: 'Starting Soon' }, completed: { color: 'text-gray-400', bgColor: 'bg-gray-400/10', label: 'Season Ended' }, }; const config = tierConfig[league.tier]; const status = statusConfig[league.seasonStatus]; return ( {/* Header */} {config.icon} {config.label} {status.label} {league.name} {league.game} {league.rating} {/* Description */} {league.description} {/* Stats Grid */} {/* Next Race */} {league.nextRace && ( Next: {league.nextRace} )} {/* Sponsorship Slots */} 0} price={`${league.secondarySlots.available}/${league.secondarySlots.total} @ $${league.secondarySlots.price}`} /> {/* Actions */} {(league.mainSponsorSlot.available || league.secondarySlots.available > 0) && ( )} ); } function StatItem({ label, value, color = 'text-white' }: { label: string, value: string | number, color?: string }) { return ( {value} {label} ); } function SlotRow({ label, available, price }: { label: string, available: boolean, price: string }) { return ( {label} {available ? ( {price} ) : ( Filled )} ); }