"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeChangeAtomId = exports.encodeChangeAtomId = void 0;
function encodeChangeAtomId(revisionTagCodec, changeAtomId) {
    if (changeAtomId.revision === undefined) {
        return { localId: changeAtomId.localId };
    }
    return {
        localId: changeAtomId.localId,
        revision: revisionTagCodec.encode(changeAtomId.revision),
    };
}
exports.encodeChangeAtomId = encodeChangeAtomId;
function decodeChangeAtomId(revisionTagCodec, changeAtomId) {
    if (changeAtomId.revision === undefined) {
        return { localId: changeAtomId.localId };
    }
    return {
        localId: changeAtomId.localId,
        revision: revisionTagCodec.decode(changeAtomId.revision),
    };
}
exports.decodeChangeAtomId = decodeChangeAtomId;
//# sourceMappingURL=utils.js.map