/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { FieldKey } from "../core/index.js";
import { FlexMapNodeSchema, FlexTreeMapNode, FlexTreeTypedField, FlexTreeUnboxField, FlexibleFieldContent } from "../feature-libraries/index.js";
import { InsertableContent } from "./proxies.js";
import { NodeKind, type ImplicitAllowedTypes, type InsertableTreeNodeFromImplicitAllowedTypes, TreeNodeSchemaClass, WithType, TreeNodeFromImplicitAllowedTypes } from "./schemaTypes.js";
import { TreeNode } from "./types.js";
import { RawTreeNode } from "./rawNode.js";
/**
 * A map of string keys to tree objects.
 *
 * @privateRemarks
 * Add support for `clear` once we have established merge semantics for it.
 *
 * @public
 */
export interface TreeMapNode<T extends ImplicitAllowedTypes = ImplicitAllowedTypes> extends ReadonlyMap<string, TreeNodeFromImplicitAllowedTypes<T>>, TreeNode {
    /**
     * Adds or updates an entry in the map with a specified `key` and a `value`.
     *
     * @param key - The key of the element to add to the map.
     * @param value - The value of the element to add to the map.
     *
     * @remarks
     * Setting the value at a key to `undefined` is equivalent to calling {@link TreeMapNode.delete} with that key.
     */
    set(key: string, value: InsertableTreeNodeFromImplicitAllowedTypes<T> | undefined): void;
    /**
     * Removes the specified element from this map by its `key`.
     *
     * @remarks
     * Note: unlike JavaScript's Map API, this method does not return a flag indicating whether or not the value was
     * deleted.
     *
     * @privateRemarks
     * Regarding the choice to not return a boolean: Since this data structure is distributed in nature, it isn't
     * possible to tell whether or not the item was deleted as a result of this method call. Returning a "best guess"
     * is more likely to create issues / promote bad usage patterns than offer useful information.
     *
     * @param key - The key of the element to remove from the map.
     */
    delete(key: string): void;
}
export declare const mapStaticDispatchMap: PropertyDescriptorMap;
/**
 * @param allowAdditionalProperties - If true, setting of unexpected properties will be forwarded to the target object.
 * Otherwise setting of unexpected properties will error.
 * @param customTargetObject - Target object of the proxy.
 * If not provided `new Map()` is used for the target and a separate object created to dispatch map methods.
 * If provided, the customTargetObject will be used as both the dispatch object and the proxy target, and therefor must provide the map functionality from {@link mapPrototype}.
 */
export declare function createMapProxy(allowAdditionalProperties: boolean, customTargetObject?: object): TreeMapNode;
/**
 * Define a {@link TreeNodeSchema} for a {@link (TreeArrayNode:interface)}.
 *
 * @param name - Unique identifier for this schema including the factory's scope.
 */
export declare function mapSchema<TName extends string, const T extends ImplicitAllowedTypes, const ImplicitlyConstructable extends boolean>(base: TreeNodeSchemaClass<TName, NodeKind.Map, TreeNode & WithType<TName>, Iterable<[string, InsertableTreeNodeFromImplicitAllowedTypes<T>]>, ImplicitlyConstructable, T>, customizable: boolean): TreeNodeSchemaClass<TName, NodeKind.Map, TreeMapNode<T> & WithType<TName>, Iterable<[string, InsertableTreeNodeFromImplicitAllowedTypes<T>]>, ImplicitlyConstructable, T>;
/**
 * The implementation of a map node created by {@link createRawNode}.
 */
export declare class RawMapNode<TSchema extends FlexMapNodeSchema> extends RawTreeNode<TSchema, ReadonlyMap<string, InsertableContent>> implements FlexTreeMapNode<TSchema> {
    get size(): number;
    has(key: string): boolean;
    get(key: string): FlexTreeUnboxField<TSchema["info"]>;
    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;
    set(key: string, value: FlexibleFieldContent<TSchema["info"]> | undefined): void;
    delete(key: string): void;
    get asObject(): {
        readonly [P in FieldKey]?: FlexTreeUnboxField<TSchema["info"], "notEmpty">;
    };
    [Symbol.iterator](): IterableIterator<[
        FieldKey,
        FlexTreeUnboxField<TSchema["info"], "notEmpty">
    ]>;
    boxedIterator(): IterableIterator<FlexTreeTypedField<TSchema["info"]>>;
}
//# sourceMappingURL=mapNode.d.ts.map