'use client'; import { Heading } from '@/ui/Heading'; import { Icon } from '@/ui/Icon'; import { Image } from '@/ui/Image'; import { PlaceholderImage } from '@/ui/PlaceholderImage'; import { Text } from '@/ui/Text'; import { Box } from '@/ui/Box'; import { Group } from '@/ui/Group'; import { Surface } from '@/ui/Surface'; import { LeagueCard as UILeagueCard, LeagueCardStats, LeagueCardFooter } from '@/ui/LeagueCard'; import { Calendar as LucideCalendar } from 'lucide-react'; import React, { ReactNode } from 'react'; interface LeagueCardProps { name: string; description?: string; coverUrl: string; logoUrl?: string; badges?: ReactNode; championshipBadge?: ReactNode; slotLabel: string; usedSlots: number; maxSlots: number | string; fillPercentage: number; hasOpenSlots: boolean; openSlotsCount: number; isTeamLeague?: boolean; usedDriverSlots?: number; maxDrivers?: number | string; timingSummary?: string; onClick?: () => void; } export function LeagueCard({ name, description, coverUrl, logoUrl, badges, championshipBadge, slotLabel, usedSlots, maxSlots, fillPercentage, hasOpenSlots, openSlotsCount, timingSummary, onClick, }: LeagueCardProps) { return ( {logoUrl ? ( {`${name} ) : ( )} } badges={ {badges} {championshipBadge} } > {name} {description || 'No description available'} = 90 ? 'warning' : fillPercentage >= 70 ? 'primary' : 'success'} /> {hasOpenSlots && ( {openSlotsCount} OPEN )} {timingSummary && ( {timingSummary.split('•')[1]?.trim() || timingSummary} )} ); }