/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import type { ChangeRebaser, GraphCommit } from "../core/index.js";
import type { ChangeEnricherReadonlyCheckout, ResubmitMachine } from "./index.js";
/**
 * Default implementation of {@link ResubmitMachine}.
 */
export declare class DefaultResubmitMachine<TChange> implements ResubmitMachine<TChange> {
    /**
     * A function that can invert a change.
     */
    private readonly inverter;
    /**
     * 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 inFlightQueue;
    /**
     * The list of commits (from oldest to most recent) that should be resubmitted.
     */
    private resubmitQueue;
    /**
     * Represents the index in the `inFlightQueue` array of the most recent in flight commit that has
     * undergone rebasing but whose enrichments have not been updated.
     * All in-flight commits with an index inferior or equal to this number have stale enrichments.
     *
     * Is -1 when *any* of the following is true:
     * - There are no in-flight commits (i.e., no local commits have been made or they have all been sequenced)
     * - None of the in-flight commits have been rebased
     * - In-flight commits that have been rebased have all had their enrichments updated
     */
    private latestInFlightCommitWithStaleEnrichments;
    constructor(
    /**
     * A function that can invert a change.
     */
    inverter: ChangeRebaser<TChange>["invert"], 
    /**
     * 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;
    prepareForResubmit(toResubmit: readonly GraphCommit<TChange>[]): void;
    peekNextCommit(): GraphCommit<TChange>;
    get isInResubmitPhase(): boolean;
    onSequencedCommitApplied(isLocal: boolean): void;
}
//# sourceMappingURL=defaultResubmitMachine.d.ts.map