/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import type { ITreeCursorSynchronous, TreeNodeSchemaIdentifier, SchemaAndPolicy } from "../core/index.js";
import { type FlexAllowedTypes, FlexFieldSchema, type FlexTreeNodeSchema, type FlexTreeSchema, type NodeKeyManager } from "../feature-libraries/index.js";
import type { TreeContent } from "../shared-tree/index.js";
import { type ImplicitAllowedTypes, type ImplicitFieldSchema, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeNodeSchema } from "./schemaTypes.js";
import { TreeConfiguration, type TreeViewConfiguration } from "./tree.js";
/**
 * Returns a cursor (in nodes mode) for the root node.
 *
 * @privateRemarks
 * Ideally this would work on any node, not just the root,
 * and the schema would come from the unhydrated node.
 * For now though, this is the only case that's needed, and we do have the data to make it work, so this is fine.
 */
export declare function cursorFromUnhydratedRoot(schema: ImplicitFieldSchema, tree: InsertableTreeNodeFromImplicitAllowedTypes, nodeKeyManager: NodeKeyManager, schemaValidationPolicy?: SchemaAndPolicy | undefined): ITreeCursorSynchronous;
/**
 * Generates a configuration object (schema + initial tree) for a FlexTree.
 * @param config - Configuration for how to {@link ITree.schematize|schematize} a tree.
 * @param nodeKeyManager - See {@link NodeKeyManager}.
 * @param schemaValidationPolicy - Stored schema and policy for the tree. If the policy specifies
 * `{@link SchemaPolicy.validateSchema} === true`, new content inserted into the tree will be validated using this
 * object.
 * @returns A configuration object for a FlexTree.
 *
 * @privateremarks
 * I wrote these docs without a ton of context, they can probably be improved.
 */
export declare function toFlexConfig(config: TreeViewConfiguration | TreeConfiguration, nodeKeyManager: NodeKeyManager, schemaValidationPolicy?: SchemaAndPolicy | undefined): TreeContent;
interface SchemaInfo {
    toFlex: () => FlexTreeNodeSchema;
    original: TreeNodeSchema;
}
type SchemaMap = Map<TreeNodeSchemaIdentifier, SchemaInfo>;
/**
 * Generate a {@link FlexTreeSchema} with `root` as the root field.
 *
 * This also has the side effect of populating the cached view schema on the class-based schema.
 */
export declare function toFlexSchema(root: ImplicitFieldSchema): FlexTreeSchema;
/**
 * Return a flex schema for the provided class schema.
 *
 * This also has the side effect of populating the cached view schema on the class based schema.
 */
export declare function getFlexSchema(root: TreeNodeSchema): FlexTreeNodeSchema;
/**
 * Normalizes an {@link ImplicitFieldSchema} into a {@link TreeFieldSchema}.
 */
export declare function convertField(schemaMap: SchemaMap, schema: ImplicitFieldSchema): FlexFieldSchema;
/**
 * Normalizes an {@link ImplicitAllowedTypes} into an {@link AllowedTypes}.
 */
export declare function convertAllowedTypes(schemaMap: SchemaMap, schema: ImplicitAllowedTypes): FlexAllowedTypes;
/**
 * Converts a {@link TreeNodeSchema} into a {@link FlexTreeNodeSchema}.
 * Ensures all types reachable from `schema` are included in `schemaMap`.
 *
 * Return value (and entries in map) are lazy to allow recursive types to work.
 * This laziness does NOT extend to adding entries to `schemaMap`:
 * all referenced types are added to it before this function returns.
 */
export declare function convertNodeSchema(schemaMap: SchemaMap, schema: TreeNodeSchema): () => FlexTreeNodeSchema;
export {};
//# sourceMappingURL=toFlexSchema.d.ts.map