/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { type TreeStoredSchema } from "../core/index.js";
import { type IDefaultEditBuilder, type TreeChunk } from "../feature-libraries/index.js";
import type { ITreeCheckout } from "./treeCheckout.js";
export declare function canInitialize(checkout: ITreeCheckout): boolean;
/**
 * Initialize a checkout with a schema and tree content.
 * This function should only be called when the tree is uninitialized (no schema or content).
 *
 * @param checkout - The tree checkout to initialize.
 * @param newSchema - The new schema to apply.
 * @param contentFactory - A function that sets the initial tree content.
 * Invoked after a schema containing all nodes from newSchema is applied.
 * Note that the final root field schema may not have been applied yet: if the root is required, it will be optional at this time
 * (so the root being empty before the insertion is not out of schema).
 * @remarks
 * If `newSchema` is not compatible with the empty tree, this function handles it using an intermediate schema
 * which supports the empty tree as well as the final tree content.
 * @privateRemarks
 * This takes in a checkout using a subset of the checkout interface to enable easier unit testing.
 */
export declare function initialize(checkout: Pick<ITreeCheckout, "storedSchema" | "updateSchema">, newSchema: TreeStoredSchema, setInitialTree: () => void): void;
/**
 * Construct a general purpose `setInitialTree` for use with {@link initialize} from a function that returns a chunk.
 * @param contentFactory - A function that returns the initial tree content as a chunk.
 * Invoked after a schema containing all nodes from newSchema is applied.
 * Note that the final root field schema may not have been applied yet: if the root is required, it will be optional at this time
 * (so the root being empty before the insertion is not out of schema).
 * @remarks
 * This does not support sequence roots as they are not allowed in the public API surface.
 * A test utility for them can be found as `initializeSequenceRoot` for testing internal logic which uses a sequence root.
 */
export declare function initializerFromChunk(checkout: Pick<ITreeCheckout, "storedSchema"> & {
    readonly editor: IDefaultEditBuilder;
}, contentFactory: () => TreeChunk): () => void;
//# sourceMappingURL=schematizeTree.d.ts.map