'use client'; import { InfoBanner } from '@/ui/InfoBanner'; import { Modal } from '@/components/shared/Modal'; import { ModalIcon } from '@/ui/ModalIcon'; import { Text } from '@/ui/Text'; import { Stack } from '@/ui/Stack'; import { TestTube } from 'lucide-react'; interface EndRaceModalProps { raceId: string; raceName: string; onConfirm: () => void; onCancel: () => void; isOpen: boolean; } export function EndRaceModal({ raceId, raceName, onConfirm, onCancel, isOpen }: EndRaceModalProps) { return ( !open && onCancel()} title="Development Test Function" description="End Race & Process Results" icon={ } primaryActionLabel="Run Test" onPrimaryAction={onConfirm} secondaryActionLabel="Cancel" onSecondaryAction={onCancel} footer={ This action cannot be undone. Use only for testing purposes. } > This is a development/testing function to simulate ending a race and processing results. It will generate realistic race results, update driver ratings, and calculate final standings. • Marks the race as completed • Generates realistic finishing positions • Updates driver ratings based on performance • Calculates championship points • Updates league standings Race: {raceName} ID: {raceId} ); }