import React from 'react'; import { Zap, Clock, Languages, Crown, Star, TrendingUp, Shield } from 'lucide-react'; import { Box } from '@/ui/Box'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { Badge } from '@/ui/Badge'; import { TeamCard as UiTeamCard } from '@/ui/TeamCard'; import { Icon } from '@/ui/Icon'; import { TeamStatItem } from '@/ui/TeamStatItem'; interface TeamCardProps { id: string; name: string; description?: string; logo?: string; memberCount: number; rating?: number | null; totalWins?: number; totalRaces?: number; performanceLevel?: 'beginner' | 'intermediate' | 'advanced' | 'pro'; isRecruiting?: boolean; specialization?: 'endurance' | 'sprint' | 'mixed' | undefined; region?: string; languages?: string[] | undefined; leagues?: string[]; category?: string; onClick?: () => void; } function getPerformanceBadge(level?: string) { switch (level) { case 'pro': return { icon: Crown, label: 'Pro', variant: 'warning' as const }; case 'advanced': return { icon: Star, label: 'Advanced', variant: 'primary' as const }; case 'intermediate': return { icon: TrendingUp, label: 'Intermediate', variant: 'info' as const }; case 'beginner': return { icon: Shield, label: 'Beginner', variant: 'success' as const }; default: return null; } } function getSpecializationBadge(specialization?: string) { switch (specialization) { case 'endurance': return { icon: Clock, label: 'Endurance', color: 'var(--warning-amber)' }; case 'sprint': return { icon: Zap, label: 'Sprint', color: 'var(--neon-aqua)' }; default: return null; } } export function TeamCard({ name, description, logo, memberCount, rating, totalWins, totalRaces, performanceLevel, isRecruiting, specialization, region, languages, category, onClick, }: TeamCardProps) { const performanceBadge = getPerformanceBadge(performanceLevel); const specializationBadge = getSpecializationBadge(specialization); return ( {performanceBadge.label} )} specializationContent={specializationBadge && ( {specializationBadge.label} )} categoryBadge={category && ( {category} )} languagesContent={languages && languages.length > 0 && ( {languages.slice(0, 2).join(', ')} {languages.length > 2 && ` +${languages.length - 2}`} )} statsContent={ <> } /> ); }