"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeBranchId = exports.encodeBranchId = void 0;
function encodeBranchId(idCompressor, branchId) {
    return branchId === "main" ? undefined : idCompressor.normalizeToOpSpace(branchId);
}
exports.encodeBranchId = encodeBranchId;
function decodeBranchId(idCompressor, encoded, context) {
    return encoded === undefined
        ? "main"
        : idCompressor.normalizeToSessionSpace(encoded, context.originatorId);
}
exports.decodeBranchId = decodeBranchId;
//# sourceMappingURL=branchIdCodec.js.map