/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import * as SchemaAware from "../schema-aware";
import { Value, Anchor, FieldKey, TreeNavigationResult, ITreeSubscriptionCursor, AnchorNode, TreeSchemaIdentifier } from "../../core";
import { FieldSchema, TreeSchema, MapSchema, FieldNodeSchema, LeafSchema, StructSchema } from "../typed-schema";
import { TreeStatus } from "../editable-tree";
import { EditableTreeEvents } from "../untypedTree";
import { Context } from "./context";
import { FieldNode, Leaf, MapNode, Struct, StructTyped, TypedField, TypedNode, UnboxField, TreeField, TreeNode } from "./editableTreeTypes";
import { LazyEntity, forgetAnchorSymbol, tryMoveCursorToAnchorSymbol } from "./lazyEntity";
export declare function makeTree(context: Context, cursor: ITreeSubscriptionCursor): LazyTree;
/**
 * A Proxy target, which together with a `nodeProxyHandler` implements a basic access to
 * the fields of {@link EditableTree} by means of the cursors.
 */
export declare abstract class LazyTree<TSchema extends TreeSchema = TreeSchema> extends LazyEntity<TSchema, Anchor> implements TreeNode {
    #private;
    /**
     * Enumerable own property providing a more JS object friendly alternative to "schema".
     */
    readonly type: TreeSchemaIdentifier;
    constructor(context: Context, schema: TSchema, cursor: ITreeSubscriptionCursor, anchorNode: AnchorNode, anchor: Anchor);
    is<TSchemaInner extends TreeSchema>(schema: TSchemaInner): this is TypedNode<TSchemaInner>;
    protected [tryMoveCursorToAnchorSymbol](anchor: Anchor, cursor: ITreeSubscriptionCursor): TreeNavigationResult;
    protected [forgetAnchorSymbol](anchor: Anchor): void;
    get value(): Value;
    tryGetField(fieldKey: FieldKey): TreeField | undefined;
    [Symbol.iterator](): IterableIterator<TreeField>;
    get parentField(): {
        readonly parent: TreeField;
        readonly index: number;
    };
    treeStatus(): TreeStatus;
    on<K extends keyof EditableTreeEvents>(eventName: K, listener: EditableTreeEvents[K]): () => void;
}
export declare class LazyMap<TSchema extends MapSchema> extends LazyTree<TSchema> implements MapNode<TSchema> {
    constructor(context: Context, schema: TSchema, cursor: ITreeSubscriptionCursor, anchorNode: AnchorNode, anchor: Anchor);
    get size(): number;
    keys(): IterableIterator<FieldKey>;
    values(): IterableIterator<UnboxField<TSchema["mapFields"]>>;
    entries(): IterableIterator<[FieldKey, UnboxField<TSchema["mapFields"]>]>;
    forEach(callbackFn: (value: UnboxField<TSchema["mapFields"]>, key: FieldKey, map: MapNode<TSchema>) => void, thisArg?: any): void;
    has(key: FieldKey): boolean;
    get(key: FieldKey): UnboxField<TSchema["mapFields"]>;
    getBoxed(key: FieldKey): TypedField<TSchema["mapFields"]>;
    [Symbol.iterator](): IterableIterator<TypedField<TSchema["mapFields"]>>;
    get asObject(): {
        readonly [P in FieldKey]?: UnboxField<TSchema["mapFields"]>;
    };
}
export declare class LazyLeaf<TSchema extends LeafSchema> extends LazyTree<TSchema> implements Leaf<TSchema> {
    constructor(context: Context, schema: TSchema, cursor: ITreeSubscriptionCursor, anchorNode: AnchorNode, anchor: Anchor);
    get value(): SchemaAware.InternalTypes.TypedValue<TSchema["leafValue"]>;
}
export declare class LazyFieldNode<TSchema extends FieldNodeSchema> extends LazyTree<TSchema> implements FieldNode<TSchema> {
    get content(): UnboxField<TSchema["structFieldsObject"][""]>;
    get boxedContent(): TypedField<TSchema["structFieldsObject"][""]>;
}
export declare abstract class LazyStruct<TSchema extends StructSchema> extends LazyTree<TSchema> implements Struct {
}
export declare function buildLazyStruct<TSchema extends StructSchema>(context: Context, schema: TSchema, cursor: ITreeSubscriptionCursor, anchorNode: AnchorNode, anchor: Anchor): LazyStruct<TSchema> & StructTyped<TSchema>;
export declare function getFieldSchema(field: FieldKey, schema: TreeSchema): FieldSchema;
//# sourceMappingURL=lazyTree.d.ts.map