interface FileField {
    path: string
    src: string
    type: string
}
interface Ssr {
    id?: string
    path: string
    content: string
    validUntil: any // go Time
}
interface Pages {
    [key: string]: Page
}
interface ApiResult<T> {
    data: T
    count: number
}

interface ApiOptions {
    method?: string
    filter?: any
    sort?: string
    lookup?: string
    limit?: number
    offset?: number
    projection?: string
    headers?: {
        [key: string]: string
    }
    params?: {
        [key: string]: string
    }
}

interface Page {
    path: string
    active: boolean
    type: "page" | "teamMembers" | "jobOffers"
    pageTitle: string
    personType: string
    personPreview: PersonPreview
    teaser: teaserHomepage
    jobOffer: jobOffer
    rows: Row[]
    id: string
    meta: {
        title: string
        description: string
        keywords: string
    }
}

interface teaserHomepage {
    showTeaser: boolean
    subTitle: string
    teaserTitle: string
    teaserDescription: string
}

interface Row {
    topTitle: string
    topTitleUpperCase: boolean
    title: string
    subTitle: string
    backgroundImage: string
    noBottomMargin: boolean
    noTopMargin: boolean
    flexWrapNormal: boolean
    twoToThree: boolean
    columns: Column[]
}

type Column =
    | { contentType: "image"; image: string; icons: { icon: string; link: string }[] }
    | { contentType: "moduleImport"; moduleImport: string }
    | { contentType: "text"; text: string }
    | { contentType: "infoBoard"; infoBoard: InfoBoard }
    | { contentType: "nestedCard"; nestedCard: NestedCard[] }
    | { contentType: "topDown"; topDown: TopDown }
    | { contentType: "textLink"; textLink: TextLink }
    | { contentType: "iconBlocks"; iconBlocks: IconBlock[] }
    | { contentType: "networkEvents"; networkEvents: NetworkEvent[] }
    | { contentType: "publications"; publications: Publication[] }

interface MediaLibrary {
    file: FileField
    alt: string
    title: string
    id: string
}

type BaseModule = { id: string }

type IconCycleModule = BaseModule & {
    type: "iconCycleCircle" | "iconCycleSquare"
    iconCycle?: IconCycleCircle | IconCycleSquare
}

type WorldCardModule = BaseModule & {
    type: "worldCard"
    worldCard?: WorldCard
}

type JobOfferModule = BaseModule & {
    type: "jobOfferLink" | "jobOffer"
    jobOfferPage?: string
}

type SimpleModule = BaseModule & {
    type: "chefTeam" | "employeeTeam"
}

type Module = IconCycleModule | WorldCardModule | JobOfferModule | SimpleModule

interface Publication {
    file: string
    content: string
}

interface NetworkEvent {
    beginDate: Date
    endDate: Date
    title: string
    file: string
}

interface iconBlock {
    icon: string
    bigText: string
    smallText: string
}

interface IconCycleSquare {
    boxes: Box[]
}

interface IconCycleCircle {
    boxes: Box[]
    innerText: string
}

interface Box {
    icon: string
    text: string
    circle: boolean
}

interface InfoBoard {
    title: string
    icon: string
    text: string
}

interface WorldCard {
    row: WorldCardRow[]
}
interface worldCardRow {
    cards: Card[]
}

interface Card {
    verticalAlignment: string
    horizontalAlignment: string
    image: string
    title: string
    properties: number[]
}

interface NestedCard {
    title: string
    description: string
}

interface TopDown {
    rows: TopDownRow[]
}

interface TopDownRow {
    inital: string
    rest: string
    description: string
}

interface PersonPreview {
    initialImage: string
    hoverImage: string
    name: string
}

interface BoxList {
    boxes: {
        name: string
    }[]
}

interface jobOffer {
    title: string
    text: string
    emailButton: boolean
    emailSubject: string
}

interface string {
    path: string
    src: string
    type: string
}

interface TextLink {
    text: string
    link: string
}

interface Navigation {
    tree: number
    pages: NavElement[]
}

interface NavElement {
    name: string
    page: string
}
