import type { LiquidContext } from '@diplodoc/liquid';
import type { Meta } from "../meta";
import type { AssetInfo, Filter, LeadingPage, Plugin, RawLeadingPage } from './types';
import type { Bucket } from "../utils";
export declare class LoaderAPI {
    deps: Bucket<{
        path: NormalizedPath;
    }[]>;
    assets: Bucket<AssetInfo[]>;
    meta: Bucket<Meta>;
    constructor(proxy?: Partial<LoaderAPI>);
}
export type LoaderContext = LiquidContext & {
    /** Relative to run.input path to current processing toc */
    path: NormalizedPath;
    lang: string;
    vars: Hash;
    plugins: Plugin[];
    emitFile(path: NormalizedPath, content: string): Promise<void>;
    readFile(path: NormalizedPath): Promise<string>;
    api: LoaderAPI;
    options: {
        disableLiquid: boolean;
        skipMissingVars?: boolean;
    };
};
export declare function loader(this: LoaderContext, yaml: RawLeadingPage): Promise<LeadingPage>;
/**
 * Find first filterable item which 'when' field is truth like.
 */
export declare function getFirstValuable<T extends Filter | string>(items: T[] | T, vars: Hash): T | undefined;
