import React from 'react'; import Image from 'next/image'; import { Crown, Flag } from 'lucide-react'; import { Box } from './Box'; import { Text } from './Text'; import { Stack } from './Stack'; import { mediaConfig } from '@/lib/config/mediaConfig'; interface LeaderboardItemProps { position: number; name: string; avatarUrl?: string; nationality: string; rating: number; wins: number; skillLevelLabel?: string; skillLevelColor?: string; categoryLabel?: string; categoryColor?: string; onClick: () => void; } export function LeaderboardItem({ position, name, avatarUrl, nationality, rating, wins, skillLevelLabel, skillLevelColor, categoryLabel, categoryColor, onClick, }: LeaderboardItemProps) { const getMedalColor = (pos: number) => { switch (pos) { case 1: return 'text-yellow-400'; case 2: return 'text-gray-300'; case 3: return 'text-amber-600'; default: return 'text-gray-500'; } }; const getMedalBg = (pos: number) => { switch (pos) { case 1: return 'bg-yellow-400/10 border-yellow-400/30'; case 2: return 'bg-gray-300/10 border-gray-300/30'; case 3: return 'bg-amber-600/10 border-amber-600/30'; default: return 'bg-iron-gray/50 border-charcoal-outline'; } }; return ( {/* Position */} {position <= 3 ? : position} {/* Avatar */} {name} {/* Info */} {name} {nationality} {categoryLabel && ( {categoryLabel} )} {skillLevelLabel && ( {skillLevelLabel} )} {/* Stats */} {rating.toLocaleString()} Rating {wins} Wins ); }