import { Logger } from '@anglr/common';
import { DynamicItemLoader } from '@anglr/dynamic';
import { LayoutComponentDef, LayoutComponentMetadata } from '@anglr/dynamic/layout';
import { Action } from '@jscrpt/common';
import { LayoutComponentsIteratorItem } from './layoutComponentsIterator.interface';
/**
 * Iterator for layout components metadata
 */
export declare class LayoutComponentsIterator<TOptions = any> {
    protected layoutMetadata: LayoutComponentMetadata<TOptions>;
    protected loader: DynamicItemLoader<LayoutComponentDef>;
    protected logger?: Logger | undefined;
    /**
     * Array of layout component iterator items, flattened layout structure
     */
    protected items: LayoutComponentsIteratorItem[];
    /**
     * Indication whether was iterator initialized
     */
    protected initialized: boolean;
    /**
     * Initialization promise
     */
    protected initPromise: Promise<void> | null;
    /**
     * Async iterator for layout components metadata
     */
    [Symbol.asyncIterator](): AsyncIterator<LayoutComponentsIteratorItem>;
    constructor(layoutMetadata: LayoutComponentMetadata<TOptions>, loader: DynamicItemLoader<LayoutComponentDef>, logger?: Logger | undefined);
    /**
     * Calls callback for each component in tree
     * @param callback - Callback called for each layout component metadata
     */
    forEach(callback: Action<[LayoutComponentMetadata, LayoutComponentsIteratorItem | undefined | null, number, number]>): Promise<void>;
    /**
     * Gets components in layout components metadata hierarchy
     */
    protected getComponents(): Promise<void>;
    /**
     * Gets metadata for single layout component metadata and its children
     * @param metadata - Metadata for layout component
     * @param parentMetadata - parent layout component iterator item
     * @param levelIndex - Index of layout component in current level
     * @param level - Current level of nexted components, 0 is root component
     */
    protected getComponent(metadata: LayoutComponentMetadata<TOptions>, parent: LayoutComponentsIteratorItem | undefined | null, levelIndex: number, level: number): Promise<void>;
    /**
     * Gets initialization promise
     */
    protected getInitPromise(): Promise<void>;
}
//# sourceMappingURL=layoutComponents.iterator.d.ts.map