/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { RevisionMetadataSource, RevisionTag, TaggedChange } from "../../core/index.js";
import { IdAllocator } from "../../util/index.js";
import { CrossFieldManager } from "../modular-schema/index.js";
import { MoveEffectTable } from "./moveEffectTable.js";
import { Changeset, Mark } from "./types.js";
/**
 * @internal
 */
export type NodeChangeComposer<TNodeChange> = (change1: TNodeChange | undefined, change2: TNodeChange | undefined) => TNodeChange | undefined;
/**
 * Composes a sequence of changesets into a single changeset.
 * @param changes - The changesets to be applied.
 * Parts of the input may be reused in the output, but the input is not mutated.
 * Each changeset in the list is assumed to be applicable after the previous one.
 * @returns A changeset that is equivalent to applying each of the given `changes` in order.
 *
 * WARNING! This implementation is incomplete:
 * - Tombstone information is ignored.
 * - Support for moves is not implemented.
 * - Support for slices is not implemented.
 */
export declare function compose<TNodeChange>(change1: TaggedChange<Changeset<TNodeChange>>, change2: TaggedChange<Changeset<TNodeChange>>, composeChild: NodeChangeComposer<TNodeChange>, _genId: IdAllocator, manager: CrossFieldManager, revisionMetadata: RevisionMetadataSource): Changeset<TNodeChange>;
export declare class ComposeQueue<T> {
    private readonly newRevision;
    private readonly moveEffects;
    private readonly revisionMetadata;
    private readonly baseMarks;
    private readonly newMarks;
    private readonly baseMarksCellSources;
    private readonly newMarksCellSources;
    constructor(baseRevision: RevisionTag | undefined, baseMarks: Changeset<T>, newRevision: RevisionTag | undefined, newMarks: Changeset<T>, moveEffects: MoveEffectTable<T>, revisionMetadata: RevisionMetadataSource);
    isEmpty(): boolean;
    pop(): ComposeMarks<T>;
    private dequeueBase;
    private dequeueNew;
    private dequeueBoth;
    private peekMinLength;
}
interface ComposeMarks<T> {
    baseMark?: Mark<T>;
    newMark?: Mark<T>;
}
export {};
//# sourceMappingURL=compose.d.ts.map