import { UniversalOption } from "@/components/common/CustomTextbox";

// ─── Dialog keys ──────────────────────────────────────────────────────────────
export type SkillDialogKey = "soft" | "tools" | "language";

// ─── API skill item shape ─────────────────────────────────────────────────────
export interface SkillApiItem {
  id: number;
  uuid: string;
  name: string;
  type: "soft" | "tool" | null;
}

// ─── API skills response ──────────────────────────────────────────────────────
export interface SkillsApiResponse {
  soft: SkillApiItem[];
  tool: SkillApiItem[];
  language: SkillApiItem[];
}

// ─── Mapped option — extends UniversalOption so CustomTextbox is happy ────────
export interface MappedSkill extends UniversalOption {
  id: number; // satisfies UniversalOption (number)
  uuid: string; // real API identifier
  label: string;
  type: "soft" | "tool" | "language";
}

// ─── API request body ─────────────────────────────────────────────────────────
export interface SkillBody {
  id: number;
  uuid: string;
  name: string;
  type: string;
}

// ─── Dialog config entry ──────────────────────────────────────────────────────
export interface SkillDialogConfig {
  title: string;
  variant: "softSkills" | "toolsSkills" | "languageSkills";
  formKey: "softSkills" | "toolsSkills" | "languageSkills";
  nameField: "softSkillName" | "toolsSkillName" | "languageSkillName";
}
