/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { ObjectNodeSchema, AllowedTypes, FieldNodeSchema, MapNodeSchema, FlexTreeNode, FlexTreeObjectNode, FlexTreeFieldNode, FlexTreeMapNode } from "../feature-libraries";
import { TreeObjectNode, TreeMapNode, TreeNode } from "./types";
import { TreeListNodeOld } from "./treeListNode";
/**
 * Retrieves the flex node associated with the given target via {@link setFlexNode}.
 * @remarks Fails if the flex node has not been set.
 */
export declare function getFlexNode<TSchema extends ObjectNodeSchema>(target: TreeObjectNode<TSchema>): FlexTreeObjectNode;
export declare function getFlexNode<TTypes extends AllowedTypes>(target: TreeListNodeOld<TTypes>): FlexTreeFieldNode<FieldNodeSchema>;
export declare function getFlexNode<TSchema extends MapNodeSchema>(target: TreeMapNode<TSchema>): FlexTreeMapNode<TSchema>;
export declare function getFlexNode(target: TreeNode): FlexTreeNode;
/**
 * Retrieves the flex node associated with the given target via {@link setFlexNode}, if any.
 */
export declare function tryGetFlexNode(target: unknown): FlexTreeNode | undefined;
/**
 * Retrieves the target associated with the given flex node via {@link setFlexNode}, if any.
 */
export declare function tryGetFlexNodeTarget(flexNode: FlexTreeNode): TreeNode | undefined;
/**
 * Associate the given target object and the given flex node.
 * @returns The target object
 * @remarks
 * This creates a 1:1 mapping between the target and tree node.
 * Either can be retrieved from the other via {@link getFlexNode}/{@link tryGetFlexNode} or {@link tryGetFlexNodeTarget}.
 * If the given target is already mapped to an flex node, the existing mapping will be overwritten.
 * If the given flex node is already mapped to a different target, this function will fail.
 */
export declare function setFlexNode<T extends TreeNode>(target: T, flexNode: FlexTreeNode): T;
//# sourceMappingURL=flexNode.d.ts.map