/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
export function encodeChangeAtomId(revisionTagCodec, changeAtomId) {
    if (changeAtomId.revision === undefined) {
        return { localId: changeAtomId.localId };
    }
    return {
        localId: changeAtomId.localId,
        revision: revisionTagCodec.encode(changeAtomId.revision),
    };
}
export function decodeChangeAtomId(revisionTagCodec, changeAtomId) {
    if (changeAtomId.revision === undefined) {
        return { localId: changeAtomId.localId };
    }
    return {
        localId: changeAtomId.localId,
        revision: revisionTagCodec.decode(changeAtomId.revision),
    };
}
//# sourceMappingURL=utils.js.map