/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
import { type LocalEmptyBatchPlaceholder, type OutboundBatch, type OutboundSingletonBatch } from "./definitions.js";
export declare function isGroupedBatch(op: ISequencedDocumentMessage): boolean;
export interface OpGroupingManagerConfig {
    readonly groupedBatchingEnabled: boolean;
}
export declare class OpGroupingManager {
    private readonly config;
    static readonly groupedBatchOp = "groupedBatch";
    private readonly logger;
    constructor(config: OpGroupingManagerConfig, logger: ITelemetryBaseLogger);
    /**
     * Creates a new batch with a single message of type "groupedBatch" and empty contents.
     * This is needed as a placeholder if a batch becomes empty on resubmit, but we are tracking batch IDs.
     * @param resubmittingBatchId - batch ID of the resubmitting batch
     * @param referenceSequenceNumber - reference sequence number
     * @returns - The outbound batch as well as the interior placeholder message
     */
    createEmptyGroupedBatch(resubmittingBatchId: string, referenceSequenceNumber: number): {
        outboundBatch: OutboundSingletonBatch;
        placeholderMessage: LocalEmptyBatchPlaceholder;
    };
    /**
     * Converts the given batch into a "grouped batch" - a batch with a single message of type "groupedBatch",
     * with contents being an array of the original batch's messages.
     *
     * If the batch already has only 1 message, it is returned as-is.
     *
     * @remarks - Remember that a BatchMessage has its content JSON serialized, so the incoming batch message contents
     * must be parsed first, and then the type and contents mentioned above are hidden in that JSON serialization.
     */
    groupBatch(batch: OutboundBatch): OutboundSingletonBatch;
    ungroupOp(op: ISequencedDocumentMessage): ISequencedDocumentMessage[];
    groupedBatchingEnabled(): boolean;
}
//# sourceMappingURL=opGroupingManager.d.ts.map