/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import type { GraphCommit, TaggedChange } from "../core/index.js";
import type { ChangeEnricherReadonlyCheckout } from "./changeEnricher.js";
import type { ResubmitMachine } from "./resubmitMachine.js";
/**
 * Default implementation of {@link ResubmitMachine}.
 */
export declare class DefaultResubmitMachine<TChange> implements ResubmitMachine<TChange> {
    /**
     * A function that can create a rollback for a given change.
     */
    private readonly makeRollback;
    /**
     * Change enricher that represent the tip of the top-level local branch (i.e., the branch on which in-flight
     * commits are applied and automatically rebased).
     */
    private readonly tip;
    /**
     * The list of commits (from oldest to most recent) that have been submitted but not sequenced.
     */
    private readonly inFlightQueue;
    /**
     * The range of in-flight commits that are currently being resubmitted.
     * Defined only during the resubmit phase.
     */
    private pendingResubmitRange;
    /**
     * The current enrichment version for in-flight commits.
     * Incremented when a peer commit is sequenced.
     */
    private currentEnrichment;
    constructor(
    /**
     * A function that can create a rollback for a given change.
     */
    makeRollback: (change: TaggedChange<TChange>) => TChange, 
    /**
     * Change enricher that represent the tip of the top-level local branch (i.e., the branch on which in-flight
     * commits are applied and automatically rebased).
     */
    tip: ChangeEnricherReadonlyCheckout<TChange>);
    onCommitSubmitted(commit: GraphCommit<TChange>): void;
    onCommitRollback(commit: GraphCommit<TChange>): void;
    prepareForResubmit(toResubmit: readonly GraphCommit<TChange>[]): void;
    peekNextCommit(): GraphCommit<TChange>;
    get isInResubmitPhase(): boolean;
    onSequencedCommitApplied(isLocal: boolean): void;
}
//# sourceMappingURL=defaultResubmitMachine.d.ts.map