/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { customFromCursor, replaceHandles, KeyEncodingOptions, } from "./customTree.js";
/**
 * Used to read a node cursor as a ConciseTree.
 */
export function conciseFromCursor(reader, context, options) {
    const config = {
        keys: KeyEncodingOptions.usePropertyKeys,
        ...options,
    };
    const storedSchemaMap = context.flexContext.schema.nodeSchema;
    const schemaMap = context.schema;
    return conciseFromCursorInner(reader, config, storedSchemaMap, schemaMap);
}
function conciseFromCursorInner(reader, options, storedSchema, schema) {
    return customFromCursor(reader, options, storedSchema, schema, conciseFromCursorInner);
}
/**
 * Clones tree, replacing any handles.
 * @remarks A strongly typed version of {@link replaceHandles}.
 * @alpha
 */
export function replaceConciseTreeHandles(tree, replacer) {
    return replaceHandles(tree, replacer);
}
//# sourceMappingURL=conciseTree.js.map