/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { GraphCommit } from "../core/index.js";
/**
 * A component that can be used by a {@link SharedTreeCore} to enrich outbound commits.
 */
export interface CommitEnricher<TChange> {
    /**
     * Enriches a commit with adequate refreshers.
     * Assumes that the commit will be submitted before the next call to `onSequencedCommitApplied()`.
     * @param commit - the commit to enrich. Not mutated.
     * @returns the enriched commit. Possibly the same as the one passed in.
     */
    enrichCommit(commit: GraphCommit<TChange>): GraphCommit<TChange>;
    /**
     * Must be called before calling `enrichCommit` as part of a resubmit phase.
     * @param toResubmit - the commits that will be resubmitted (from oldest to newest).
     * This must be the most rebased version of these commits (i.e., rebased over all known concurrent edits)
     * as opposed to the version which was last submitted.
     * `toResubmit` can be safely mutated by the caller after this call returns.
     */
    prepareForResubmit(toResubmit: readonly GraphCommit<TChange>[]): void;
    /**
     * Is true iff the commit enricher is currently in a resubmit phase.
     */
    readonly isInResubmitPhase: boolean;
    /**
     * Must be called after a sequenced commit is applied.
     * @param isLocal - whether the sequenced commit was generated by the local session.
     */
    onSequencedCommitApplied(isLocal: boolean): void;
}
//# sourceMappingURL=commitEnricher.d.ts.map