"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.replaceConciseTreeHandles = exports.conciseFromCursor = void 0;
const customTree_js_1 = require("./customTree.js");
/**
 * Used to read a node cursor as a ConciseTree.
 */
function conciseFromCursor(reader, context, options) {
    const config = {
        useStoredKeys: false,
        ...options,
    };
    const storedSchemaMap = context.flexContext.schema.nodeSchema;
    const schemaMap = context.schema;
    return conciseFromCursorInner(reader, config, storedSchemaMap, schemaMap);
}
exports.conciseFromCursor = conciseFromCursor;
function conciseFromCursorInner(reader, options, storedSchema, schema) {
    return (0, customTree_js_1.customFromCursor)(reader, options, storedSchema, schema, conciseFromCursorInner);
}
/**
 * Clones tree, replacing any handles.
 * @remarks A strongly typed version of {@link replaceHandles}.
 * @alpha
 */
function replaceConciseTreeHandles(tree, replacer) {
    return (0, customTree_js_1.replaceHandles)(tree, replacer);
}
exports.replaceConciseTreeHandles = replaceConciseTreeHandles;
//# sourceMappingURL=conciseTree.js.map