import { TImageUrls } from "./Image";
import { TSEO } from "./Seo";

export interface TPage {
    id: number;
    name: string;
    slug: string;
    content: TContentItem[];
    seo: TSEO;
}

type TContentItem = TMainBannerSection | TMilestoneSection;

export interface TMainBannerSection {
    type: "section_main_banner";
    data: TMainBanner;
}

export interface TMilestoneSection {
    type: "section_journey";
    data: {
        journey: TMilestone[];
    };
}

export interface TMainBanner {
    title: string;
    description: string;
    button_title: string;
    image: number | null;
    file: number | null;
    urls: TImageUrls;
    image_preview: string;
    alt_text: string | null;
    file_url: string;
}

export interface TContentData {
    journey: TMilestone[];
    content_title: string;
    journey_continue_title: string;
}

export interface TMilestone {
    from_year: string;
    to_year: string;
    image: string;
    title: string;
    description: string;
    urls: TImageUrls;
    image_preview: string;
    alt_text: string | null;
}
