import { MedalBadge } from '@/components/leaderboards/MedalBadge'; import { mediaConfig } from '@/lib/config/mediaConfig'; import { Badge } from '@/ui/Badge'; import { Box } from '@/ui/Box'; import { Heading } from '@/ui/Heading'; import { Icon } from '@/ui/Icon'; import { Image } from '@/ui/Image'; import { MiniStat } from '@/ui/MiniStat'; import { Text } from '@/ui/Text'; import { Flag, Shield, Star, TrendingUp } from 'lucide-react'; const SKILL_LEVELS = [ { id: 'pro', label: 'Pro', icon: Star, color: 'text-yellow-400', bgColor: 'bg-yellow-400/10', borderColor: 'border-yellow-400/30', description: 'Elite competition level' }, { id: 'advanced', label: 'Advanced', icon: Star, color: 'text-purple-400', bgColor: 'bg-purple-400/10', borderColor: 'border-purple-400/30', description: 'Highly competitive' }, { id: 'intermediate', label: 'Intermediate', icon: TrendingUp, color: 'text-primary-blue', bgColor: 'bg-primary-blue/10', borderColor: 'border-primary-blue/30', description: 'Developing skills' }, { id: 'beginner', label: 'Beginner', icon: Shield, color: 'text-green-400', bgColor: 'bg-green-400/10', borderColor: 'border-green-400/30', description: 'Learning the ropes' }, ]; const CATEGORIES = [ { id: 'beginner', label: 'Beginner', color: 'text-green-400', bgColor: 'bg-green-400/10', borderColor: 'border-green-400/30' }, { id: 'intermediate', label: 'Intermediate', color: 'text-primary-blue', bgColor: 'bg-primary-blue/10', borderColor: 'border-primary-blue/30' }, { id: 'advanced', label: 'Advanced', color: 'text-purple-400', bgColor: 'bg-purple-400/10', borderColor: 'border-purple-400/30' }, { id: 'pro', label: 'Pro', color: 'text-yellow-400', bgColor: 'bg-yellow-400/10', borderColor: 'border-yellow-400/30' }, { id: 'endurance', label: 'Endurance', color: 'text-orange-400', bgColor: 'bg-orange-400/10', borderColor: 'border-orange-400/30' }, { id: 'sprint', label: 'Sprint', color: 'text-red-400', bgColor: 'bg-red-400/10', borderColor: 'border-red-400/30' }, ]; interface FeaturedDriverCardProps { driver: { id: string; name: string; nationality: string; avatarUrl?: string; ratingLabel: string; winsLabel: string; podiumsLabel: string; skillLevel?: string; category?: string; }; position: number; onClick: () => void; } export function FeaturedDriverCard({ driver, position, onClick }: FeaturedDriverCardProps) { const levelConfig = SKILL_LEVELS.find((l) => l.id === driver.skillLevel); const categoryConfig = CATEGORIES.find((c) => c.id === driver.category); const getBorderColor = (pos: number) => { switch (pos) { case 1: return 'border-yellow-400/50'; case 2: return 'border-gray-300/50'; case 3: return 'border-amber-600/50'; default: return 'border-charcoal-outline'; } }; const getHoverBorderColor = (pos: number) => { switch (pos) { case 1: return 'yellow-400'; case 2: return 'gray-300'; case 3: return 'amber-600'; default: return 'primary-blue'; } }; return ( {/* Header with Position */} {categoryConfig && ( {categoryConfig.label} )} {levelConfig && ( {levelConfig.label} )} {/* Avatar & Name */} {driver.name} {driver.name} {driver.nationality} {/* Stats */} ); }