/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import type { TAnySchema } from "@sinclair/typebox";
import { type IJsonCodec } from "../../codec/index.js";
import { type ChangeAtomId, type ChangeEncodingContext, type EncodedRevisionTag, type RevisionTag } from "../../core/index.js";
import { type JsonCompatibleReadOnly } from "../../util/index.js";
import { type EncodedChangeAtomId, type FieldChangeEncodingContext } from "../modular-schema/index.js";
import { type Encoded } from "./formatV2.js";
import type { SequenceCodecHelpers } from "./helperTypes.js";
import { type Changeset, type Mark, type MarkEffect } from "./types.js";
export declare function makeV2CodecHelpers(revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>): SequenceCodecHelpers;
export type DecodeMarkEffect = (encoded: Encoded.MarkEffect, count: number, cellId: ChangeAtomId | undefined, context: FieldChangeEncodingContext) => MarkEffect;
export declare function decodeSequenceChangeset(changeset: Encoded.Changeset<NodeChangeSchema>, context: FieldChangeEncodingContext, changeAtomIdCodec: IJsonCodec<ChangeAtomId, EncodedChangeAtomId, EncodedChangeAtomId, ChangeEncodingContext>, decodeMarkEffect: DecodeMarkEffect): Changeset;
/**
 * If we want to make the node change aspect of this codec more type-safe, we could adjust generics
 * to be in terms of the schema rather than the concrete type of the node change.
 */
type NodeChangeSchema = TAnySchema;
export declare function makeV2Codec(revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>): IJsonCodec<Changeset, JsonCompatibleReadOnly, JsonCompatibleReadOnly, FieldChangeEncodingContext>;
export declare function encodeSequenceChangeset(changeset: Changeset, context: FieldChangeEncodingContext, encodeRevision: (revision: RevisionTag | undefined) => EncodedRevisionTag | undefined, changeAtomIdCodec: IJsonCodec<ChangeAtomId, EncodedChangeAtomId, EncodedChangeAtomId, ChangeEncodingContext>, encodeMarkEffect: EncodeMarkEffect): JsonCompatibleReadOnly & Encoded.Changeset<NodeChangeSchema>;
type EncodeMarkEffect = (mark: Mark, context: FieldChangeEncodingContext, encodeRevision: (revision: RevisionTag | undefined) => EncodedRevisionTag | undefined, changeAtomIdCodec: IJsonCodec<ChangeAtomId, EncodedChangeAtomId, EncodedChangeAtomId, ChangeEncodingContext>) => Encoded.MarkEffect;
export declare function encodeRevisionWithContext(revision: RevisionTag | undefined, context: ChangeEncodingContext, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>): EncodedRevisionTag | undefined;
/**
 * If the encoded mark effect represents a simple cell rename (with no effect on root nodes),
 * returns the encoded form of the ID the cell is being renamed to,
 * and otherwise returns undefined.
 */
export declare function tryGetEncodedCellRename(encoded: Encoded.MarkEffect): EncodedChangeAtomId | undefined;
export {};
//# sourceMappingURL=sequenceFieldCodecV2.d.ts.map