/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import type { MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
import { type CodecTree, type CodecWriteOptions, type DependentFormatVersion, type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../codec/index.js";
import type { ChangeEncodingContext, EncodedRevisionTag, RevisionTag, SchemaAndPolicy } from "../core/index.js";
import { type JsonCompatibleReadOnly } from "../util/index.js";
import type { DecodedMessage } from "./messageTypes.js";
import type { IIdCompressor } from "@fluidframework/id-compressor";
import { MessageFormatVersion } from "./messageFormat.js";
export interface MessageEncodingContext {
    idCompressor: IIdCompressor;
    schema?: SchemaAndPolicy;
}
/**
 * Convert a MinimumVersionForCollab to a MessageFormatVersion.
 * @param clientVersion - The MinimumVersionForCollab to convert.
 * @returns The MessageFormatVersion that corresponds to the provided MinimumVersionForCollab.
 */
export declare function clientVersionToMessageFormatVersion(clientVersion: MinimumVersionForCollab, writeVersionOverride?: MessageFormatVersion): MessageFormatVersion;
export interface MessageCodecOptions {
    readonly messageFormatSelector?: (minVersionForCollab: MinimumVersionForCollab) => MessageFormatVersion;
}
/**
 * Returns the version that should be used for testing shared branches.
 */
export declare function messageFormatVersionSelectorForSharedBranches(clientVersion: MinimumVersionForCollab): MessageFormatVersion;
export declare function makeMessageCodec<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, dependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: MessageCodecOptions & CodecWriteOptions): IJsonCodec<DecodedMessage<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, MessageEncodingContext>;
/**
 * @privateRemarks Exported for testing.
 */
export declare function makeMessageCodecs<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, dependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions): ICodecFamily<DecodedMessage<TChangeset>, MessageEncodingContext>;
export declare function getCodecTreeForMessageFormatWithChange(clientVersion: MinimumVersionForCollab, changeFormat: CodecTree): CodecTree;
//# sourceMappingURL=messageCodecs.d.ts.map