/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { lowestMinVersionForCollab } from "@fluidframework/runtime-utils/internal";
import { ClientVersionDispatchingCodecBuilder, FluidClientVersion, } from "../../codec/index.js";
import { makeDetachedNodeToFieldCodecV1 } from "./detachedFieldIndexCodecV1.js";
import { makeDetachedNodeToFieldCodecV2 } from "./detachedFieldIndexCodecV2.js";
import { DetachedFieldIndexFormatVersion } from "./detachedFieldIndexFormatCommon.js";
export const detachedFieldIndexCodecBuilder = ClientVersionDispatchingCodecBuilder.build("DetachedFieldIndex", [
    {
        minVersionForCollab: lowestMinVersionForCollab,
        formatVersion: DetachedFieldIndexFormatVersion.v1,
        codec: (buildData) => makeDetachedNodeToFieldCodecV1(buildData.revisionTagCodec, buildData.idCompressor),
    },
    {
        minVersionForCollab: FluidClientVersion.v2_52,
        formatVersion: DetachedFieldIndexFormatVersion.v2,
        codec: (buildData) => makeDetachedNodeToFieldCodecV2(buildData.revisionTagCodec, buildData.idCompressor),
    },
]);
//# sourceMappingURL=detachedFieldIndexCodecs.js.map