/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { Value, Anchor, FieldKey, TreeNavigationResult, ITreeSubscriptionCursor, AnchorNode, TreeNodeSchemaIdentifier, TreeValue } from "../../core";
import { TreeFieldSchema, TreeNodeSchema, MapNodeSchema, FieldNodeSchema, LeafNodeSchema, ObjectNodeSchema } from "../typed-schema";
import { LocalNodeKey } from "../node-key";
import { EditableTreeEvents } from "./treeEvents";
import { Context } from "./context";
import { FlexTreeFieldNode, FlexTreeLeafNode, FlexTreeMapNode, FlexTreeObjectNode, FlexTreeObjectNodeTyped, FlexTreeTypedField, FlexTreeTypedNode, FlexTreeUnboxField, FlexTreeField, FlexTreeNode, boxedIterator, TreeStatus, FlexibleFieldContent, onNextChange, FlexTreeEntityKind, flexTreeMarker } from "./flexTreeTypes";
import { LazyEntity, forgetAnchorSymbol, tryMoveCursorToAnchorSymbol } from "./lazyEntity";
export declare function makeTree(context: Context, cursor: ITreeSubscriptionCursor): LazyTreeNode;
/**
 * Lazy implementation of {@link FlexTreeNode}.
 */
export declare abstract class LazyTreeNode<TSchema extends TreeNodeSchema = TreeNodeSchema> extends LazyEntity<TSchema, Anchor> implements FlexTreeNode {
    #private;
    get [flexTreeMarker](): FlexTreeEntityKind.Node;
    /**
     * Enumerable own property providing a more JS object friendly alternative to "schema".
     */
    readonly type: TreeNodeSchemaIdentifier;
    constructor(context: Context, schema: TSchema, cursor: ITreeSubscriptionCursor, anchorNode: AnchorNode, anchor: Anchor);
    is<TSchemaInner extends TreeNodeSchema>(schema: TSchemaInner): this is FlexTreeTypedNode<TSchemaInner>;
    protected [tryMoveCursorToAnchorSymbol](anchor: Anchor, cursor: ITreeSubscriptionCursor): TreeNavigationResult;
    protected [forgetAnchorSymbol](anchor: Anchor): void;
    get value(): Value;
    tryGetField(fieldKey: FieldKey): FlexTreeField | undefined;
    [boxedIterator](): IterableIterator<FlexTreeField>;
    get parentField(): {
        readonly parent: FlexTreeField;
        readonly index: number;
    };
    treeStatus(): TreeStatus;
    on<K extends keyof EditableTreeEvents>(eventName: K, listener: EditableTreeEvents[K]): () => void;
    [onNextChange](fn: (node: FlexTreeNode) => void): () => void;
}
export declare class LazyMap<TSchema extends MapNodeSchema> extends LazyTreeNode<TSchema> implements FlexTreeMapNode<TSchema> {
    constructor(context: Context, schema: TSchema, cursor: ITreeSubscriptionCursor, anchorNode: AnchorNode, anchor: Anchor);
    get size(): number;
    keys(): IterableIterator<FieldKey>;
    values(): IterableIterator<FlexTreeUnboxField<TSchema["info"], "notEmpty">>;
    entries(): IterableIterator<[
        FieldKey,
        FlexTreeUnboxField<TSchema["info"], "notEmpty">
    ]>;
    forEach(callbackFn: (value: FlexTreeUnboxField<TSchema["info"], "notEmpty">, key: FieldKey, map: FlexTreeMapNode<TSchema>) => void, thisArg?: any): void;
    has(key: string): boolean;
    get(key: string): FlexTreeUnboxField<TSchema["info"]>;
    getBoxed(key: string): FlexTreeTypedField<TSchema["info"]>;
    set(key: string, content: FlexibleFieldContent<TSchema["info"]> | undefined): void;
    delete(key: FieldKey): void;
    [boxedIterator](): IterableIterator<FlexTreeTypedField<TSchema["info"]>>;
    [Symbol.iterator](): IterableIterator<[
        FieldKey,
        FlexTreeUnboxField<TSchema["info"], "notEmpty">
    ]>;
    get asObject(): {
        readonly [P in FieldKey]?: FlexTreeUnboxField<TSchema["info"], "notEmpty">;
    };
}
export declare class LazyLeaf<TSchema extends LeafNodeSchema> extends LazyTreeNode<TSchema> implements FlexTreeLeafNode<TSchema> {
    constructor(context: Context, schema: TSchema, cursor: ITreeSubscriptionCursor, anchorNode: AnchorNode, anchor: Anchor);
    get value(): TreeValue<TSchema["info"]>;
}
export declare class LazyFieldNode<TSchema extends FieldNodeSchema> extends LazyTreeNode<TSchema> implements FlexTreeFieldNode<TSchema> {
    get content(): FlexTreeUnboxField<TSchema["info"]>;
    get boxedContent(): FlexTreeTypedField<TSchema["info"]>;
}
export declare abstract class LazyObjectNode<TSchema extends ObjectNodeSchema> extends LazyTreeNode<TSchema> implements FlexTreeObjectNode {
    get localNodeKey(): LocalNodeKey | undefined;
}
export declare function buildLazyObjectNode<TSchema extends ObjectNodeSchema>(context: Context, schema: TSchema, cursor: ITreeSubscriptionCursor, anchorNode: AnchorNode, anchor: Anchor): LazyObjectNode<TSchema> & FlexTreeObjectNodeTyped<TSchema>;
export declare function getBoxedField(objectNode: LazyTreeNode, key: FieldKey, fieldSchema: TreeFieldSchema): FlexTreeField;
//# sourceMappingURL=lazyNode.d.ts.map