import React from 'react'; import { Stack } from '@/ui/Stack'; import { Button } from '@/ui/Button'; import { Icon } from '@/ui/Icon'; import { Trophy, Scale, LogOut, CheckCircle, XCircle, PlayCircle } from 'lucide-react'; interface RaceActionBarProps { status: 'scheduled' | 'running' | 'completed' | 'cancelled' | string; isUserRegistered: boolean; canRegister: boolean; onRegister?: () => void; onWithdraw?: () => void; onResultsClick?: () => void; onStewardingClick?: () => void; onFileProtest?: () => void; isAdmin?: boolean; onCancel?: () => void; onReopen?: () => void; onEndRace?: () => void; isLoading?: { register?: boolean; withdraw?: boolean; cancel?: boolean; reopen?: boolean; complete?: boolean; }; } export function RaceActionBar({ status, isUserRegistered, canRegister, onRegister, onWithdraw, onResultsClick, onStewardingClick, onFileProtest, isAdmin, onCancel, onReopen, onEndRace, isLoading = {} }: RaceActionBarProps) { return ( {status === 'scheduled' && ( <> {!isUserRegistered && canRegister && ( )} {isUserRegistered && ( )} {isAdmin && ( )} )} {status === 'running' && ( <> {isAdmin && ( )} )} {status === 'completed' && ( <> {isUserRegistered && onFileProtest && ( )} {isAdmin && onReopen && ( )} )} {status === 'cancelled' && isAdmin && onReopen && ( )} ); }