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

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

type TContentItem = TMainBannerSection | TGridSection | TQuoteSection;

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

export interface TMainBanner {
    link: string;
    image: string;
    image_mobile: string;
    title: string;
    subtitle: string;
    urls: TImageUrls;
    image_mobile_urls: TImageUrls;
    image_preview: string;
    alt_text: string | null;
    image_mobile_image_preview: string;
    image_mobile_alt_text: string | null;
    font_size_smaller: string | null;
    font_size_small: string | null;
    font_size_big: string | null;
    font_size_bigger: string | null;
    line_height_smaller: string | null;
    line_height_small: string | null;
    line_height_big: string | null;
    line_height_bigger: string | null;
}

export interface TGridSection {
    type: "section_image_quote";
    data: TGrid;
}

export interface TQuoteSection {
    type: "section_quote";
    data: TQuote;
}

export interface TQuote {
    title: string;
    subtitle: string;
}

export interface TGrid {
    title: string;
    section_image_quote: TGridItems[];
}

export interface TGridItems {
    text: string | null;
    description: string | null;
    image: string | null;
    Text?: string;
    Image?: string;
    urls?: TImageUrls;
    image_preview?: string;
    alt_text?: string | null;
}
