export interface OutputData {
  time: number;
  blocks: ContentBlock[];
  version: string;
}

export interface ContentBlock {
  id: string;
  type: string;
  data:
    | ParagraphData
    | HeaderData
    | ListData
    | ImageData
    | QuoteData
    | CodeData;
}

export interface ParagraphData {
  text: string;
}

export interface HeaderData {
  text: string;
  level: number;
}

export interface ListData {
  style: "ordered" | "unordered";
  items: string[];
}

export interface ImageData {
  file: {
    url: string;
    width?: number;
    height?: number;
  };
  caption?: string;
}

export interface QuoteData {
  text: string;
  caption?: string;
}

export interface CodeData {
  code: string;
}

export interface Post {
  slug: string;
  status: string;
  user_created: string;
  date_created: string;
  user_updated: string | null;
  date_updated: string | null;
  title: string;
  content: OutputData | null;
  excerpt: string | null;
  featured_image: string | null;
  imageUrl?: string | null;
}
export interface HeroSection {
  id: string;
  hero_title?: string;
  hero_subtitle?: string;
  hero_cover?: string;
  hero_buttons?: HeroButton[];
}

interface HeroButton {
  label?: string;
  link?: string;
}

interface ItemsQuery {
  fields?: string[];
}

export interface Vacancy {
  id: string;
  title: string;
  slug: string;
  description: string;
  department: string;
  location: {
    city: string;
    country: string;
    remote: boolean;
  };
  employmentType: "Full-time" | "Part-time" | "Contract" | "Internship";
  experienceLevel:
    | "Entry-level"
    | "Mid-level"
    | "Senior-level"
    | "Lead"
    | "Manager";
  salary?: {
    min: number;
    max: number;
    currency: string;
    period: "Annual" | "Monthly" | "Hourly";
  };
  responsibilities: string[];
  requiredQualifications: string[];
  preferredQualifications?: string[];
  benefits?: string[];
  applicationDeadline?: string; // ISO 8601 date string
  postedDate: string; // ISO 8601 date string
  contactPerson?: {
    name: string;
    email: string;
    phone?: string;
  };
  status: "Open" | "Closed" | "Filled";
}
