'use client'; import React from 'react'; import { TestTube } from 'lucide-react'; import { Text } from '@/ui/Text'; import { Stack } from '@/ui/Stack'; import { Modal } from '@/ui/Modal'; import { InfoBanner } from '@/ui/InfoBanner'; import { Box } from '@/ui/Box'; import { ModalIcon } from '@/ui/ModalIcon'; 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} ); }