"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.setInChangeAtomIdMap = exports.getFromChangeAtomIdMap = exports.newChangeAtomIdBTree = void 0;
const index_js_1 = require("../core/index.js");
const index_js_2 = require("../util/index.js");
/** Creates a new {@link ChangeAtomIdBTree} */
function newChangeAtomIdBTree(entries) {
    return (0, index_js_2.newTupleBTree)(compareKeys, entries);
}
exports.newChangeAtomIdBTree = newChangeAtomIdBTree;
const compareKeys = (0, index_js_2.createTupleComparator)([index_js_1.comparePartialRevisions, index_js_1.compareChangesetLocalIds]);
function getFromChangeAtomIdMap(map, id) {
    return map.get([id.revision, id.localId]);
}
exports.getFromChangeAtomIdMap = getFromChangeAtomIdMap;
function setInChangeAtomIdMap(map, id, value) {
    map.set([id.revision, id.localId], value);
}
exports.setInChangeAtomIdMap = setInChangeAtomIdMap;
//# sourceMappingURL=changeAtomIdBTree.js.map