"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.toDownPath = void 0;
const index_js_1 = require("../core/index.js");
/**
 * Compute a top-town {@link DownPath} from an {@link UpPath}.
 */
function toDownPath(upPath) {
    const downPath = (0, index_js_1.topDownPath)(upPath);
    const stepDownPath = downPath.map((u) => {
        return { field: u.parentField, index: u.parentIndex };
    });
    stepDownPath.shift(); // remove last step to the root node
    return stepDownPath;
}
exports.toDownPath = toDownPath;
//# sourceMappingURL=editableTreeBinder.js.map