"use client"; import { useState } from "react"; import { TooltipProvider } from "@/components/ui/tooltip"; import { SkillCategory, SkillLevel, CategoryEvaluation } from "@/lib/types"; import { SkillSelector } from "./skill-selector"; import { EvaluationHeader, SkillLevelLegend, CategoryTabs, SkillEvaluationGrid, } from "./evaluation"; interface SkillEvaluationProps { categories: SkillCategory[]; evaluations: CategoryEvaluation[]; onUpdateSkill: (category: string, skillId: string, level: SkillLevel) => void; onAddSkill: (category: string, skillId: string) => void; onRemoveSkill: (category: string, skillId: string) => void; } export function SkillEvaluation({ categories, evaluations, onUpdateSkill, onAddSkill, onRemoveSkill, }: SkillEvaluationProps) { const [selectedCategory, setSelectedCategory] = useState( categories[0]?.category || "" ); const currentCategory = categories.find( (cat) => cat.category === selectedCategory ); const currentEvaluation = evaluations.find( (evaluation) => evaluation.category === selectedCategory ); if (!currentCategory) { return