import { Button } from "~/components/ui/button"; import { Badge } from "~/components/ui/badge"; import { AutodraftSettings } from "~/components/AutodraftSettings"; interface QueueSectionProps { queue: Array<{ id: string; participantId: string; }>; availableParticipants: Array<{ id: string; name: string; }>; eligibility: { flexPicksUsed: number; flexPicksAvailable: number; picksBySport: Record; sportAvailability: Record< string, { sportName: string; sportId: string } >; ineligibleReasons: Record; } | null; seasonId: string; teamId: string; isMyTurn: boolean; userAutodraft: { isEnabled: boolean; mode: "next_pick" | "while_on"; }; onClearQueue: () => void; onRemoveFromQueue: (queueId: string) => void; onAutodraftUpdate: (isEnabled: boolean, mode: "next_pick" | "while_on") => void; } export function QueueSection({ queue, availableParticipants, eligibility, seasonId, teamId, isMyTurn, userAutodraft, onClearQueue, onRemoveFromQueue, onAutodraftUpdate, }: QueueSectionProps) { return (

Queue ({queue.length})

{queue.length > 0 && ( )}
{/* Queue List */} {queue.length === 0 ? (

Click participants to add to your queue

) : (
{queue.map((item, index) => (
{index + 1}

{availableParticipants.find( (p) => p.id === item.participantId )?.name || "Unknown"}

))}
)} {/* Autodraft Settings */}
); }