/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { type TreeNodeSchemaIdentifier, type TreeNodeStoredSchema, type TreeStoredSchema } from "../core/index.js";
import { type FlexAllowedTypes, FlexFieldSchema, type FlexTreeNodeSchema, type FlexTreeSchema } from "../feature-libraries/index.js";
import { type TreeNodeSchema } from "./core/index.js";
import { type ImplicitAllowedTypes, type ImplicitFieldSchema } from "./schemaTypes.js";
interface SchemaInfo {
    readonly toFlex: () => FlexTreeNodeSchema;
    readonly 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;
/**
 * Converts a {@link ImplicitFieldSchema} into a {@link TreeStoredSchema}.
 */
export declare function toStoredSchema(root: ImplicitFieldSchema): TreeStoredSchema;
/**
 * 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;
/**
 * Return a stored 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 getStoredSchema(root: TreeNodeSchema): TreeNodeStoredSchema;
/**
 * 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