import { ArrowRight, Car, ChevronRight, LucideIcon, Trophy, Zap } from 'lucide-react'; import { Box } from './Box'; import { Heading } from './Heading'; import { Icon } from './Icon'; import { Link } from './Link'; import { Stack } from './Stack'; import { Surface } from './Surface'; import { Text } from './Text'; interface RaceCardProps { track: string; car: string; scheduledAt: string; status: string; leagueName: string; leagueId?: string; strengthOfField?: number | null; onClick?: () => void; statusConfig: { border: string; bg: string; color: string; icon: LucideIcon | null; label: string; }; } export function RaceCard({ track, car, scheduledAt, status, leagueName, leagueId, strengthOfField, onClick, statusConfig, }: RaceCardProps) { const scheduledAtDate = new Date(scheduledAt); return ( {/* Live indicator */} {status === 'running' && ( )} {/* Time Column */} {scheduledAtDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })} {status === 'running' ? 'LIVE' : scheduledAtDate.toLocaleDateString()} {/* Divider */} {/* Main Content */} {track} {car} {strengthOfField && ( SOF {strengthOfField} )} {/* Status Badge */} {statusConfig.icon && ( )} {statusConfig.label} {/* League Link */} e.stopPropagation()} > {leagueName} {/* Arrow */} ); }