import { useRouter } from 'next/navigation'; import Image from 'next/image'; import { Award, ChevronRight, Crown, Trophy, Users } from 'lucide-react'; import Button from '@/components/ui/Button'; import { getMediaUrl } from '@/lib/utilities/media'; const SKILL_LEVELS: { id: string; label: string; icon: React.ElementType; color: string; bgColor: string; borderColor: string; }[] = [ { id: 'pro', label: 'Pro', icon: () => null, color: 'text-yellow-400', bgColor: 'bg-yellow-400/10', borderColor: 'border-yellow-400/30', }, { id: 'advanced', label: 'Advanced', icon: () => null, color: 'text-purple-400', bgColor: 'bg-purple-400/10', borderColor: 'border-purple-400/30', }, { id: 'intermediate', label: 'Intermediate', icon: () => null, color: 'text-primary-blue', bgColor: 'bg-primary-blue/10', borderColor: 'border-primary-blue/30', }, { id: 'beginner', label: 'Beginner', icon: () => null, color: 'text-green-400', bgColor: 'bg-green-400/10', borderColor: 'border-green-400/30', }, ]; interface TeamLeaderboardPreviewProps { topTeams: Array<{ id: string; name: string; logoUrl?: string; category?: string; memberCount: number; totalWins: number; isRecruiting: boolean; rating?: number; performanceLevel: string; }>; onTeamClick: (id: string) => void; } export default function TeamLeaderboardPreview({ topTeams, onTeamClick }: TeamLeaderboardPreviewProps) { const router = useRouter(); const getMedalColor = (position: number) => { switch (position) { case 0: return 'text-yellow-400'; case 1: return 'text-gray-300'; case 2: return 'text-amber-600'; default: return 'text-gray-500'; } }; const getMedalBg = (position: number) => { switch (position) { case 0: return 'bg-yellow-400/10 border-yellow-400/30'; case 1: return 'bg-gray-300/10 border-gray-300/30'; case 2: return 'bg-amber-600/10 border-amber-600/30'; default: return 'bg-iron-gray/50 border-charcoal-outline'; } }; if (topTeams.length === 0) return null; return (
Highest rated racing teams