import { ILogger } from '../../../platform/log/common/logService';
import { AnnotatedStringReplacement, IEditData, StringEdit, StringReplacement } from '../../../util/vs/editor/common/core/edits/stringEdit';
import { OffsetRange } from '../../../util/vs/editor/common/core/ranges/offsetRange';
export declare const maxAgreementOffset = 10;
export declare const maxImperfectAgreementLength = 5;
export interface NesRebaseConfigs {
    /**
     * When enabled, if the user's typed text is an editor auto-close pair
     * (e.g. `()`, `[]`, `{}`, `<>`, `""`, `''`, ` `` `) and both characters
     * appear in order in the suggestion's insert text, the rebase absorbs
     * the typed pair instead of failing.
     */
    readonly absorbSubsequenceTyping?: boolean;
    /**
     * When enabled, allows rebase to succeed when the user typed more text
     * than the model predicted at the same position (reverse agreement).
     * Model edits consumed by the user's typing are absorbed, and any
     * unconsumed portion of subsequent model edits is offered as the
     * rebased suggestion.
     */
    readonly reverseAgreement?: boolean;
    /**
     * Maximum length (in characters) of an imperfect agreement that is still
     * accepted during a strict rebase. When the base new-text is longer than
     * this value and it does not start at the exact predicted offset, the
     * rebase is considered a miss. Helper functions such as {@link tryRebase}
     * use {@link maxImperfectAgreementLength} when `nesConfigs` is omitted,
     * but explicit {@link NesRebaseConfigs} objects must provide this value.
     */
    readonly maxImperfectAgreementLength: number;
}
export declare class EditDataWithIndex implements IEditData<EditDataWithIndex> {
    readonly index: number;
    constructor(index: number);
    join(data: EditDataWithIndex): EditDataWithIndex | undefined;
}
export declare function tryRebase(originalDocument: string, editWindow: OffsetRange | undefined, originalEdits: readonly StringReplacement[], detailedEdits: AnnotatedStringReplacement<EditDataWithIndex>[][], userEditSince: StringEdit, currentDocumentContent: string, currentSelection: readonly OffsetRange[], resolution: 'strict' | 'lenient', logger: ILogger, nesConfigs?: NesRebaseConfigs): {
    rebasedEdit: StringReplacement;
    rebasedEditIndex: number;
}[] | 'outsideEditWindow' | 'rebaseFailed' | 'error' | 'inconsistentEdits';
export declare function checkEditConsistency(original: string, edit: StringEdit, current: string, logger: ILogger, enabled?: boolean): boolean;
export declare function tryRebaseStringEdits<T extends IEditData<T>>(content: string, ours: StringEdit, base: StringEdit, resolution: 'strict' | 'lenient', nesConfigs?: NesRebaseConfigs): StringEdit | undefined;
//# sourceMappingURL=editRebase.d.ts.map