import type { ReactNode } from "react"; import { cn } from "~/lib/utils"; type CoronaVariant = | "gradient" | "electric" | "emerald" | "amber" | "coral"; interface DraftPickCellProps { pickNumber: number; round: number; pickInRound: number; state: "picked" | "current" | "upcoming"; pick?: { participant: { name: string }; sport: { name: string }; }; corona?: CoronaVariant; className?: string; children?: ReactNode; } const coronaClasses: Record = { gradient: "[background:linear-gradient(to_bottom,#adf661,#2ce1c1)]", electric: "bg-electric", emerald: "bg-emerald-500", amber: "bg-amber-accent", coral: "bg-coral-accent", }; export function DraftPickCell({ pickNumber, round, pickInRound, state, pick, corona = "gradient", className, children, }: DraftPickCellProps) { const showCorona = state === "picked"; return (
{showCorona && (
)}
{round}.{String(pickInRound).padStart(2, "0")}
{state === "picked" && pick ? (
{pick.participant.name}
{pick.sport.name}
) : state === "current" ? (
On Clock
) : null} {children &&
{children}
}
); }