'use client'; import { routes } from '@/lib/routing/RouteConfig'; 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'; import { Badge } from '@/ui/Badge'; import { ArrowRight, Car, ChevronRight, LucideIcon, Trophy, Zap } from 'lucide-react'; interface RaceCardProps { track: string; car: string; scheduledAt: string; status: string; leagueName: string; leagueId?: string; strengthOfField?: number | null; onClick?: () => void; statusConfig: { intent: 'primary' | 'success' | 'warning' | 'critical' | 'default' | 'secondary' | 'info' | 'danger'; icon: LucideIcon | null; label: string; }; } export function RaceCard({ track, car, scheduledAt, status, leagueName, leagueId, strengthOfField, onClick, statusConfig, }: RaceCardProps) { const scheduledAtDate = new Date(scheduledAt); return ( {/* Time Column */} {scheduledAtDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })} {status === 'running' ? 'LIVE' : scheduledAtDate.toLocaleDateString()} {/* Main Content */} {track} {car} {strengthOfField && ( SOF {strengthOfField} )} {/* Status Badge */} {statusConfig.label} {/* League Link */} e.stopPropagation()} > {leagueName} {/* Arrow */} ); }