'use client'; import React from 'react'; import { Box } from '@/ui/Box'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { Surface } from '@/ui/Surface'; interface PenaltyEntry { driverId: string; driverName: string; type: 'time_penalty' | 'grid_penalty' | 'points_deduction' | 'disqualification' | 'warning' | 'license_points'; value: number; reason: string; notes?: string; } interface RacePenaltyRowProps { penalty: PenaltyEntry; } export function RacePenaltyRow({ penalty }: RacePenaltyRowProps) { return ( ! {penalty.driverName} {penalty.type.replace('_', ' ')} {penalty.reason} {penalty.notes && ( {penalty.notes} )} {penalty.type === 'time_penalty' && `+${penalty.value}s`} {penalty.type === 'grid_penalty' && `+${penalty.value} grid`} {penalty.type === 'points_deduction' && `-${penalty.value} pts`} {penalty.type === 'disqualification' && 'DSQ'} {penalty.type === 'warning' && 'Warning'} {penalty.type === 'license_points' && `${penalty.value} LP`} ); }