import type { IncludeMode } from './loader';
export type YfmString = string & {
    __interpolable: true;
};
export type Filter = {
    when?: string | boolean;
};
export type TextFilter = {
    text: string;
} & Filter;
export type RawTocLabel = {
    title: string;
    description?: string;
    theme?: string;
} & Filter;
export type WithItems<Item> = {
    items?: Item[];
};
export type RawToc = {
    path: NormalizedPath;
    pdf?: {
        startPages?: string[];
        endPages?: string[];
    };
    title?: YfmString | TextFilter[];
    label?: YfmString | TextFilter[] | RawTocLabel | RawTocLabel[];
    stage?: string;
    href?: YfmString & (RelativePath | URIString);
    navigation?: boolean | YfmString | Navigation;
    items?: RawTocItem[];
};
export type NavigationHeaderItem = Filter & {
    text?: string;
    type?: string;
    url?: string;
    [key: string]: unknown;
};
export type Navigation = {
    logo?: object;
    header?: {
        leftItems?: NavigationHeaderItem[];
        rightItems?: NavigationHeaderItem[];
    };
};
export type RawTocItem = Filter & {
    hidden?: boolean;
    items?: RawTocItem[];
} & (RawEntryTocItem | RawNamedTocItem | RawIncludeTocItem);
export type RawEntryTocItem = {
    name?: YfmString;
    href: YfmString & (RelativePath | URIString);
};
export type RawNamedTocItem = {
    name: YfmString;
    href?: YfmString & (RelativePath | URIString);
};
type RawIncludeTocItem = {
    name?: YfmString;
    include: TocInclude;
};
export type TocInclude = {
    mode?: IncludeMode;
    path: RelativePath;
    includers?: Includer[];
};
export type Includer<T extends Hash = Hash> = {
    name: string;
} & T;
export type IncluderOptions<T extends Hash = Hash> = {
    /**
     * Relative to run.input include path
     */
    path: RelativePath;
} & T;
export type IncludeInfo = {
    from: NormalizedPath;
    mode: IncludeMode;
    content?: RawToc;
    base?: NormalizedPath | undefined;
};
export type Toc = {
    path: NormalizedPath;
    pdf?: {
        startPages?: string[];
        endPages?: string[];
    };
    id: string;
    title?: string;
    label?: {
        title: string;
        description?: string;
        theme?: string;
    };
    stage?: string;
    href?: NormalizedPath;
    navigation?: boolean | Navigation;
    items?: TocItem[];
};
export type TocItem = (NamedTocItem | EntryTocItem) & {
    hidden?: boolean;
} & {
    id: string;
    items?: TocItem[];
};
export type EntryTocItem = {
    name: string;
    href: NormalizedPath;
    'restricted-access'?: string[];
    hidden?: boolean;
};
export type NamedTocItem = {
    name: string;
    href?: NormalizedPath;
    'restricted-access'?: string[];
};
export type GraphTocData = {
    type: 'toc';
    data: Toc | undefined | Promise<Toc | undefined>;
};
type GraphTocIncludeData = {
    type: 'source';
    data: undefined;
};
type GraphTocGeneratorData = {
    type: 'generator';
    data: undefined;
};
type GraphEntryData = {
    type: 'entry';
    data: unknown;
};
export type GraphData = GraphTocData | GraphTocIncludeData | GraphTocGeneratorData | GraphEntryData;
export {};
