import { DriverViewModel } from "@/lib/view-models/DriverViewModel"; import { ProtestViewModel } from "@/lib/view-models/ProtestViewModel"; import { RaceViewModel } from "@/lib/view-models/RaceViewModel"; import { Box } from "@/ui/Box"; import { Card } from "@/ui/Card"; import { ProtestListItem } from "@/ui/ProtestListItem"; import { Stack } from "@/ui/Stack"; import { Text } from "@/ui/Text"; import { Flag } from "lucide-react"; interface PendingProtestsListProps { protests: ProtestViewModel[]; races: Record; drivers: Record; leagueId: string; onReviewProtest: (protest: ProtestViewModel) => void; onProtestReviewed: () => void; } export function PendingProtestsList({ protests, leagueId, }: PendingProtestsListProps) { if (protests.length === 0) { return ( All Clear! 🏁 No pending protests to review ); } return ( {protests.map((protest) => { const filedAt = protest.filedAt || protest.submittedAt; const daysSinceFiled = Math.floor((Date.now() - new Date(filedAt).getTime()) / (1000 * 60 * 60 * 24)); const isUrgent = daysSinceFiled > 2; return ( ); })} ); }