import { FlexTreeSchema, FlexFieldSchema, FlexAllowedTypes, TreeNodeSchemaBase, FlexTreeNodeSchema } from "../feature-libraries/index.js";
import { ITreeCursorSynchronous, TreeNodeSchemaIdentifier } from "../core/index.js";
import { TreeContent } from "../shared-tree/index.js";
import { ImplicitAllowedTypes, ImplicitFieldSchema, InsertableTreeNodeFromImplicitAllowedTypes, TreeNodeSchema } from "./schemaTypes.js";
import { TreeConfiguration } 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: FlexTreeSchema, tree: InsertableTreeNodeFromImplicitAllowedTypes): ITreeCursorSynchronous;
export declare function toFlexConfig(config: TreeConfiguration): 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;
/**
 * 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): TreeNodeSchemaBase | undefined;
export declare function setFlexSchemaFromClassSchema(simple: TreeNodeSchema, flex: TreeNodeSchemaBase): void;
export {};
//# sourceMappingURL=toFlexSchema.d.ts.map