import type { ImageMetadata } from "astro";
import type { ComponentType } from "preact";

// Icon Types
export type LucideIcon = ComponentType<{ size?: number; class?: string }>;
export type AstroIconName = string; // For astro-icon string references like "mdi:email"
export type CustomIconComponent = ComponentType<any>;
export type IconType = LucideIcon | AstroIconName | CustomIconComponent;

export interface Talk {
  id: string;
  name: string;
  description: string;
  link: string;
  date?: string;
}

export interface Project {
  id: string;
  name: string;
  description: string;
  link: string;
  technologies?: string[];
  status?: string;
}

export interface SocialLink {
  id: string;
  name: string;
  url: string;
  icon: IconType;
  ariaLabel: string;
}

export interface TechLink {
  id: string;
  name: string;
  url: string;
  icon: IconType;
  ariaLabel: string;
}

export interface NavigationItem {
  id: string;
  name: string;
  path: string;
  tooltip: string;
  icon: IconType;
  enabled?: boolean;
  isActive?: (path: string) => boolean;
}

export interface ResumeConfig {
  tomlFile: string;
  pdfFile: {
    path: string;
    filename: string;
    displayText: string;
  };
  layout?: {
    leftColumn?: string[];
    rightColumn?: string[];
  };
  sections: {
    enabled: string[];
    summary?: {
      title?: string;
      enabled?: boolean;
    };
    experience?: {
      title?: string;
      enabled?: boolean;
    };
    education?: {
      title?: string;
      enabled?: boolean;
    };
    skills?: {
      title?: string;
      enabled?: boolean;
    };
    volunteer?: {
      title?: string;
      enabled?: boolean;
    };
    profiles?: {
      title?: string;
      enabled?: boolean;
    };
    awards?: {
      title?: string;
      enabled?: boolean;
    };
  };
}

export interface PersonalInfo {
  name: string;
  profileImage: {
    src: ImageMetadata;
    alt: string;
    width?: number;
    height?: number;
  };
  tagline: string;
  description?: string;
}

export interface HomepageSections {
  socialLinks: {
    title: string;
    description?: string;
  };
  techStack: {
    title: string;
    description?: string;
  };
}

export interface SiteConfig {
  personal: PersonalInfo;
  homepage: HomepageSections;
  resume: ResumeConfig;
  meta: {
    title: string;
    description: string;
    url: string;
    author: string;
  };
}
