import { TreeSchema, TreeFieldSchema as FlexTreeFieldSchema, AllowedTypes as FlexAllowedTypes, TreeNodeSchemaBase as FlexTreeNodeSchemaBase, TreeNodeSchema as FlexTreeNodeSchema } from "../feature-libraries";
import { ITreeCursorSynchronous, TreeNodeSchemaIdentifier } from "../core";
import { type InitializeAndSchematizeConfiguration } from "../shared-tree";
import { ImplicitAllowedTypes, ImplicitFieldSchema, InsertableTreeNodeFromImplicitAllowedTypes, TreeNodeSchema } from "./schemaTypes";
import { TreeConfiguration } from "./tree";
/**
 * 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: TreeSchema, tree: InsertableTreeNodeFromImplicitAllowedTypes): ITreeCursorSynchronous;
export declare function toFlexConfig(config: TreeConfiguration): InitializeAndSchematizeConfiguration;
interface SchemaInfo {
    toFlex: () => FlexTreeNodeSchema;
    original: TreeNodeSchema;
}
type SchemaMap = Map<TreeNodeSchemaIdentifier, SchemaInfo>;
/**
 * Generate a {@link TreeSchema} 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): TreeSchema;
/**
 * 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): FlexTreeFieldSchema;
/**
 * 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;
/**
 * A symbol for storing FlexTreeSchema on TreeNodeSchema.
 * Eagerly set on leaves, and lazily set for other cases.
 */
export declare const flexSchemaSymbol: unique symbol;
export declare function cachedFlexSchemaFromClassSchema(schema: TreeNodeSchema): FlexTreeNodeSchemaBase | undefined;
export declare function setFlexSchemaFromClassSchema(simple: TreeNodeSchema, flex: FlexTreeNodeSchemaBase): void;
export {};
//# sourceMappingURL=toFlexSchema.d.ts.map