import type { LiquidContext } from '@diplodoc/liquid';
import type { TocService } from './TocService';
import type { IncludeInfo, RawToc, Toc } from './types';
export type LoaderContext = LiquidContext & {
    /** Relative to run.input path to current processing toc */
    path: NormalizedPath;
    /** Path of last include level */
    from: NormalizedPath;
    /** Path of last include level with 'merge' mode */
    base?: NormalizedPath;
    mode: IncludeMode | undefined;
    vars: Hash;
    include: (path: RelativePath, include: IncludeInfo) => Promise<Toc | undefined>;
    options: {
        removeHiddenItems: boolean;
        removeEmptyItems: boolean;
        skipMissingVars?: boolean;
        mode: string;
    };
    toc: TocService;
};
export declare enum IncludeMode {
    RootMerge = "root_merge",
    Merge = "merge",
    Link = "link"
}
type MergeIncludeInfo = IncludeInfo & {
    mode: IncludeMode.RootMerge | IncludeMode.Merge;
    base: RelativePath;
};
type LinkIncludeInfo = IncludeInfo & {
    mode: IncludeMode.Link;
    base?: undefined;
};
export declare function isLinkMode(include: IncludeInfo | LoaderContext): include is LinkIncludeInfo;
export declare function isMergeMode(include: IncludeInfo | LoaderContext): include is MergeIncludeInfo;
export declare function loader(this: LoaderContext, toc: RawToc): Promise<RawToc>;
export {};
