import { PenaltyHistoryList } from '@/components/leagues/PenaltyHistoryList'; import { QuickPenaltyModal } from '@/components/leagues/QuickPenaltyModal'; import { ReviewProtestModal } from '@/components/leagues/ReviewProtestModal'; import { StewardingQueuePanel } from '@/components/leagues/StewardingQueuePanel'; import { StewardingStats } from '@/components/leagues/StewardingStats'; import { PenaltyFAB } from '@/components/races/PenaltyFAB'; import { TemplateProps } from '@/lib/contracts/components/ComponentContracts'; import type { StewardingViewData } from '@/lib/view-data/StewardingViewData'; import { Box } from '@/ui/Box'; import { Button } from '@/ui/Button'; import { Card } from '@/ui/Card'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; interface StewardingTemplateProps extends TemplateProps { activeTab: 'pending' | 'history'; onTabChange: (tab: 'pending' | 'history') => void; selectedProtest: any; onReviewProtest: (id: string) => void; onCloseProtestModal: () => void; onAcceptProtest: (protestId: string, penaltyType: string, penaltyValue: number, stewardNotes: string) => Promise; onRejectProtest: (protestId: string, stewardNotes: string) => Promise; showQuickPenaltyModal: boolean; setShowQuickPenaltyModal: (show: boolean) => void; allPendingProtests: any[]; allResolvedProtests: any[]; racesMap: any; driverMap: any; currentDriverId: string; } export function StewardingTemplate({ viewData, activeTab, onTabChange, selectedProtest, onReviewProtest, onCloseProtestModal, onAcceptProtest, onRejectProtest, showQuickPenaltyModal, setShowQuickPenaltyModal, allPendingProtests, allResolvedProtests, racesMap, driverMap, currentDriverId, }: StewardingTemplateProps) { return ( {/* Tab navigation */} {/* Content */} {activeTab === 'pending' ? ( ) : ( )} {activeTab === 'history' && ( setShowQuickPenaltyModal(true)} /> )} {selectedProtest && ( )} {showQuickPenaltyModal && ( ({ id: d.id, name: d.name, iracingId: '', country: '', joinedAt: '', avatarUrl: null, }) as any)} onClose={() => setShowQuickPenaltyModal(false)} adminId={currentDriverId || ''} races={viewData.races.map(r => ({ id: r.id, track: r.track, scheduledAt: new Date(r.scheduledAt) }))} /> )} ); }