import { useState } from 'react'; import { ChevronRight, Users, Trophy, UserPlus } from 'lucide-react'; import type { TeamSummaryViewModel } from '@/lib/view-models/TeamSummaryViewModel'; import TeamCard from './TeamCard'; type SkillLevel = 'pro' | 'advanced' | 'intermediate' | 'beginner'; interface SkillLevelConfig { id: SkillLevel; label: string; icon: React.ElementType; color: string; bgColor: string; borderColor: string; description: string; } interface SkillLevelSectionProps { level: SkillLevelConfig; teams: TeamSummaryViewModel[]; onTeamClick: (id: string) => void; defaultExpanded?: boolean; } export default function SkillLevelSection({ level, teams, onTeamClick, defaultExpanded = false }: SkillLevelSectionProps) { const [isExpanded, setIsExpanded] = useState(defaultExpanded); const recruitingTeams = teams.filter((t) => t.isRecruiting); const displayedTeams = isExpanded ? teams : teams.slice(0, 3); const Icon = level.icon; if (teams.length === 0) return null; return (
{level.description}