import { ArrowRight, Car, ChevronRight, LucideIcon, Trophy, Zap } from 'lucide-react'; import { Badge } from './Badge'; import { Box } from './Box'; import { Heading } from './Heading'; import { Icon } from './Icon'; import { Link } from './Link'; import { Stack } from './Stack'; import { Text } from './Text'; interface RaceListItemProps { track: string; car: string; timeLabel?: string; relativeTimeLabel?: string; dateLabel?: string; dayLabel?: string; status: string; leagueName?: string | null; leagueHref?: string; strengthOfField?: number | null; onClick: () => void; statusConfig: { icon: LucideIcon; variant: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'; label: string; }; } export function RaceListItem({ track, car, timeLabel, relativeTimeLabel, dateLabel, dayLabel, status, leagueName, leagueHref, strengthOfField, onClick, statusConfig, }: RaceListItemProps) { const StatusIcon = statusConfig.icon; return ( {/* Live indicator */} {status === 'running' && ( )} {/* Time/Date Column */} {dateLabel && ( {dateLabel} )} {dayLabel || timeLabel} {status === 'running' ? 'LIVE' : relativeTimeLabel || timeLabel} {/* Divider */} {/* Main Content */} {track} {car} {strengthOfField && ( SOF {strengthOfField} )} {/* Status Badge */} {statusConfig.label} {/* League Link */} {leagueName && leagueHref && ( e.stopPropagation()} variant="primary" size="sm" > {leagueName} )} {/* Arrow */} ); }