"use client"; import { useState } from "react"; import { Button } from "@/components/ui/button"; import { ChevronDown, ChevronRight, ExternalLink } from "lucide-react"; import { getCategoryIcon } from "@/lib/category-icons"; import { getScoreColors } from "@/lib/score-utils"; import { getImportanceColors } from "@/lib/tech-colors"; import { SkillProgress } from "./skill-progress"; import Link from "next/link"; interface CategoryCardProps { category: { category: string; score: number; maxScore: number; }; categoryEval?: { category: string; selectedSkillIds: string[]; skills: Array<{ skillId: string; level: string | null; }>; }; skillCategory?: { category: string; icon: string; skills: Array<{ id: string; name: string; icon?: string; importance: "incontournable" | "majeure" | "standard"; }>; }; } export function CategoryCard({ category, categoryEval, skillCategory, }: CategoryCardProps) { const [isExpanded, setIsExpanded] = useState(false); const skillsCount = categoryEval?.selectedSkillIds?.length || 0; const evaluatedCount = categoryEval?.skills.filter((s) => s.level !== null).length || 0; const CategoryIcon = skillCategory ? getCategoryIcon(skillCategory.icon) : null; return (
Aucune compétence sélectionnée dans cette catégorie