/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { type FieldKey } from "../../core/index.js";
import type { FlexTreeContext, FlexTreeObjectNode } from "../flex-tree/index.js";
import { type FlexTreeSchema } from "../typed-schema/index.js";
import { type LocalNodeKey } from "./nodeKey.js";
/**
 * The node key index records nodes with {@link LocalNodeKey}s and allows them to be looked up by key.
 */
export declare class NodeKeyIndex implements ReadonlyMap<LocalNodeKey, FlexTreeObjectNode> {
    readonly fieldKey: FieldKey;
    private readonly nodes;
    constructor(fieldKey: FieldKey, keys?: Iterable<[LocalNodeKey, FlexTreeObjectNode]>);
    /**
     * Returns true if the given schema contains the node key type, otherwise false
     */
    static hasNodeKeyTreeSchema(schema: FlexTreeSchema): boolean;
    /**
     * Search the tree for all nodes with keys, and record them in this index for lookup.
     * This should be called each time the tree changes; each call to scan forgets all existing keys.
     * @param context - the flex tree context in which to search for node keys
     */
    scanKeys(context: FlexTreeContext): void;
    /**
     * Create a copy of this index which can be mutated without affecting this one.
     */
    clone(context: FlexTreeContext): NodeKeyIndex;
    forEach(callbackfn: (value: FlexTreeObjectNode, key: LocalNodeKey, map: ReadonlyMap<LocalNodeKey, FlexTreeObjectNode>) => void, thisArg?: unknown): void;
    get(key: LocalNodeKey): FlexTreeObjectNode | undefined;
    has(key: LocalNodeKey): boolean;
    get size(): number;
    entries(): IterableIterator<[LocalNodeKey, FlexTreeObjectNode]>;
    keys(): IterableIterator<LocalNodeKey>;
    values(): IterableIterator<FlexTreeObjectNode>;
    [Symbol.iterator](): IterableIterator<[LocalNodeKey, FlexTreeObjectNode]>;
    private findKeys;
    private findKeysInField;
}
//# sourceMappingURL=nodeKeyIndex.d.ts.map