/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { topDownPath } from "../core/index.js";
/**
 * Compute a top-town {@link DownPath} from an {@link UpPath}.
 */
export function toDownPath(upPath) {
    const downPath = 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;
}
//# sourceMappingURL=editableTreeBinder.js.map