export type ResumeTemplateId = "modern-portrait" | "executive-landscape";

export interface ResumeProfileResponse {
  success: boolean;
  data: ResumeProfile;
  message: string;
}

export interface ResumeProfile {
  uuid: string;
  user: { name: string; email: string | null; phone: string | null };
  profession: { name: string } | null;
  image: string | null;
  about_me: string | null;
  calculated_years_of_experience: number | null;
  years_of_experience: string | null;
  phone: string | null;
  secondary_phone: string | null;
  country: string | null;
  city: string | null;
  present_address: string | null;
  declaration: string | null;
  expertises: NamedItem[];
  skills: { soft: NamedItem[]; tool: NamedItem[] };
  educations: EducationRecord[];
  certificates: CertificateRecord[];
  awards: AwardRecord[];
  experiences: ExperienceRecord[];
  projects: ProjectRecord[];
  references: ReferenceRecord[];
  links: ProfileLink[];
  languages: LanguageRecord[];
}

interface NamedItem {
  uuid: string;
  name: string;
}

interface EducationRecord {
  uuid: string;
  degree_name: string;
  institute_name: string;
  major: string | null;
  result: string | null;
  passing_year: string | null;
}

interface CertificateRecord {
  uuid: string;
  certificate_name: string;
  organization: string;
  issue_year: string | null;
  credential_url: string | null;
}

interface AwardRecord {
  uuid: string;
  award_name: string;
  organization: string;
  year: string | null;
}

interface ExperienceRecord {
  uuid: string;
  job_title: string;
  company_name: string;
  employment_type: string | null;
  start_date: string | null;
  end_date: string | null;
  is_current: boolean;
  responsibilities: string | null;
}

interface ProjectRecord {
  uuid: string;
  project_name: string;
  responsibilities: string | null;
  task_url: string | null;
}

interface ReferenceRecord {
  uuid: string;
  name: string;
  occupation: string | null;
  organization: string | null;
  phone: string | null;
  relationship: string | null;
}

interface ProfileLink {
  uuid: string;
  platform: string;
  url: string;
}
interface LanguageRecord {
  uuid: string;
  language_name: string;
  proficiency: string | null;
}

export interface ResumeModel {
  name: string;
  title: string;
  photoUrl: string | null;
  summary: string | null;
  contact: string[];
  location: string | null;
  socialLinks: { label: string; url: string }[];
  skills: string[];
  expertises: string[];
  experiences: ResumeExperience[];
  education: ResumeEducation[];
  projects: ResumeProject[];
  certificates: ResumeRecognition[];
  awards: ResumeRecognition[];
  languages: { name: string; proficiency: string | null }[];
  references: ResumeReference[];
  declaration: string | null;
}

export interface ResumeExperience {
  id: string;
  title: string;
  organization: string;
  period: string;
  employmentType: string | null;
  highlights: string[];
}
export interface ResumeEducation {
  id: string;
  degree: string;
  institution: string;
  detail: string | null;
  year: string | null;
}
export interface ResumeProject {
  id: string;
  name: string;
  role: string | null;
  url: string | null;
}
export interface ResumeRecognition {
  id: string;
  name: string;
  organization: string;
  year: string | null;
  url?: string | null;
}
export interface ResumeReference {
  id: string;
  name: string;
  role: string | null;
  organization: string | null;
  phone: string | null;
  relationship: string | null;
}
