/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { type AnchorNode, type DetachedField, type SchemaAndPolicy } from "../../core/index.js";
import type { FlexTreeContext } from "./context.js";
import { TreeStatus } from "./flexTreeTypes.js";
/**
 * Checks the detached field and returns the TreeStatus based on whether or not the detached field is a root field.
 * @param detachedField - the detached field you want to check.
 * @returns the {@link TreeStatus} from the detached field provided.
 */
export declare function treeStatusFromDetachedField(detachedField: DetachedField): TreeStatus;
/**
 * Determines the tree status based on the anchor cache.
 *
 * Checks the anchorNode's cache to get the tree status.
 * If the cache is undefined or stale, it is updated and the treeStatus based on its detachedField is returned.
 *
 * @param anchors - the {@link AnchorSet} to compare your anchorNode cache to.
 * @param anchorNode - the {@link AnchorNode} to get the {@link TreeStatus} of.
 * @returns the {@link TreeStatus} of the anchorNode provided.
 */
export declare function treeStatusFromAnchorCache(anchorNode: AnchorNode): TreeStatus;
export declare const detachedFieldSlot: import("../../core/index.js").AnchorSlot<DetachedFieldCache>;
export interface DetachedFieldCache {
    generationNumber: number;
    detachedField: DetachedField;
}
/**
 * Utility function to get a {@link SchemaAndPolicy} object from a {@link FlexTreeContext}.
 * @returns A {@link SchemaAndPolicy} object with the stored schema and policy from the context provided.
 * For {@link Unhydrated} contexts this schema may only describe the types allowed subtree for this particular entity.
 */
export declare function getSchemaAndPolicy(context: FlexTreeContext): SchemaAndPolicy;
/**
 * Indexing for {@link FlexTreeField.boxedAt} and {@link FlexTreeSequenceField.at} supports the
 * usage of negative indices, which regular indexing using `[` and `]` does not.
 *
 * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at
 * for additional context on the semantics.
 *
 * @returns A positive index that can be used in regular indexing. Returns
 * undefined if that index would be out-of-bounds.
 */
export declare function indexForAt(index: number, length: number): number | undefined;
//# sourceMappingURL=utilities.d.ts.map