/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { FieldKey, TreeNavigationResult, ITreeSubscriptionCursor, TreeFieldStoredSchema, FieldAnchor, FieldUpPath, ITreeCursor } from "../../core";
import { FieldKind } from "../modular-schema";
import { arrayLikeMarkerSymbol, NewFieldContent } from "../contextuallyTyped";
import { TreeStatus } from "../editable-tree-2";
import { ProxyContext } from "./editableTreeContext";
import { EditableField, EditableTree, UnwrappedEditableField, UnwrappedEditableTree, proxyTargetSymbol } from "./editableTreeTypes";
import { ProxyTarget } from "./ProxyTarget";
export declare function makeField(context: ProxyContext, fieldSchema: TreeFieldStoredSchema, cursor: ITreeSubscriptionCursor): EditableField;
/**
 * A Proxy target, which together with a `fieldProxyHandler` implements a basic access to
 * the nodes of {@link EditableField} by means of the cursors.
 */
export declare class FieldProxyTarget extends ProxyTarget<FieldAnchor> implements EditableField {
    readonly fieldSchema: TreeFieldStoredSchema;
    readonly fieldKey: FieldKey;
    readonly [arrayLikeMarkerSymbol]: true;
    readonly kind: FieldKind;
    constructor(context: ProxyContext, fieldSchema: TreeFieldStoredSchema, cursor: ITreeSubscriptionCursor, fieldAnchor: FieldAnchor);
    /**
     * Check if this field is the same as a different field.
     * This is defined to mean that both are in the same editable tree, and are the same field on the same node.
     * This is more than just a reference comparison because unlike EditableTree nodes, fields are not cached on anchors and can be duplicated.
     */
    private isSameAs;
    normalizeNewContent(content: NewFieldContent): readonly ITreeCursor[];
    get [proxyTargetSymbol](): FieldProxyTarget;
    get parent(): EditableTree | undefined;
    protected tryMoveCursorToAnchor(anchor: FieldAnchor, cursor: ITreeSubscriptionCursor): TreeNavigationResult;
    protected forgetAnchor(anchor: FieldAnchor): void;
    [index: number]: UnwrappedEditableTree;
    get length(): number;
    /**
     * Returns a node (unwrapped by default, see {@link UnwrappedEditableTree}) by its index.
     */
    unwrappedTree(index: number): UnwrappedEditableTree;
    /**
     * Gets a node by its index without unwrapping.
     */
    getNode(index: number): EditableTree;
    /**
     * Gets array of unwrapped nodes.
     */
    private asArray;
    [Symbol.iterator](): IterableIterator<UnwrappedEditableTree>;
    /**
     * Asserts this field is a sequence, and returns an editor for it.
     */
    private sequenceEditor;
    /**
     * Asserts this field is a sequence, and returns an editor for it.
     */
    private optionalEditor;
    /**
     * Asserts this field is a sequence, and returns an editor for it.
     */
    private valueFieldEditor;
    get content(): EditableTree | undefined | EditableField;
    setContent(newContent: NewFieldContent): void;
    remove(): void;
    insertNodes(index: number, newContent: NewFieldContent): void;
    moveNodes(sourceIndex: number, count: number, destinationIndex: number, destinationField?: EditableField): void;
    treeStatus(): TreeStatus;
    getfieldPath(): FieldUpPath;
    removeNodes(index: number, count?: number): void;
    replaceNodes(index: number, newContent: NewFieldContent, count?: number): void;
}
/**
 * @param context - the common context of the field.
 * @param fieldSchema - the TreeFieldStoredSchema of the field.
 * @param cursor - the cursor, which must point to the field being proxified.
 */
export declare function unwrappedField(context: ProxyContext, fieldSchema: TreeFieldStoredSchema, cursor: ITreeSubscriptionCursor): UnwrappedEditableField;
/**
 * Checks the type of an UnwrappedEditableField.
 * @alpha
 */
export declare function isEditableField(field: UnwrappedEditableField): field is EditableField;
//# sourceMappingURL=editableField.d.ts.map