/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { Type } from "@sinclair/typebox";
import { SessionIdSchema } from "../core/index.js";
import { EditManagerFormatVersion, SequencedCommit, SummarySessionBranch, } from "./editManagerFormatCommons.js";
const noAdditionalProps = { additionalProperties: false };
export const EncodedEditManager = (tChange) => Type.Object({
    version: Type.Union([
        Type.Literal(EditManagerFormatVersion.v1),
        Type.Literal(EditManagerFormatVersion.v2),
        Type.Literal(EditManagerFormatVersion.v3),
        Type.Literal(EditManagerFormatVersion.v4),
        Type.Literal(EditManagerFormatVersion.v6),
    ]),
    trunk: Type.Array(SequencedCommit(tChange)),
    branches: Type.Array(Type.Tuple([SessionIdSchema, SummarySessionBranch(tChange)])),
}, noAdditionalProps);
/* eslint-enable @typescript-eslint/explicit-function-return-type */
//# sourceMappingURL=editManagerFormatV1toV4.js.map