import { IObservable } from "../../../../../base/common/observable.js";
import { ICommandService } from "../../../../../platform/commands/common/commands.service.js";
import { ISingleEditOperation } from "../../../../common/core/editOperation.js";
import { OffsetEdit } from "../../../../common/core/offsetEdit.js";
import { Position } from "../../../../common/core/position.js";
import { PositionOffsetTransformerBase } from "../../../../common/core/positionToOffset.js";
import { Range } from "../../../../common/core/range.js";
import { SingleTextEdit } from "../../../../common/core/textEdit.js";
import { InlineCompletion, Command, InlineCompletionWarning, PartialAcceptInfo, InlineCompletionEndOfLifeReason } from "../../../../common/languages.js";
import { ITextModel } from "../../../../common/model.js";
import { IDisplayLocation, InlineSuggestData, InlineSuggestionList, SnippetInfo } from "./provideInlineCompletions.js";
export type InlineSuggestionItem = InlineEditItem | InlineCompletionItem;
export declare namespace InlineSuggestionItem {
    function create(data: InlineSuggestData, textModel: ITextModel): InlineSuggestionItem;
}
declare abstract class InlineSuggestionItemBase {
    protected readonly _data: InlineSuggestData;
    readonly identity: InlineSuggestionIdentity;
    readonly displayLocation: InlineSuggestDisplayLocation | undefined;
    constructor(_data: InlineSuggestData, identity: InlineSuggestionIdentity, displayLocation: InlineSuggestDisplayLocation | undefined);
    get source(): InlineSuggestionList;
    get isFromExplicitRequest(): boolean;
    get forwardStable(): boolean;
    get editRange(): Range;
    get targetRange(): Range;
    get insertText(): string;
    get semanticId(): string;
    get action(): Command | undefined;
    get command(): Command | undefined;
    get warning(): InlineCompletionWarning | undefined;
    get showInlineEditMenu(): boolean;
    get hash(): string;
    get shownCommand(): Command | undefined;
    private get _sourceInlineCompletion();
    abstract getSingleTextEdit(): SingleTextEdit;
    abstract withEdit(userEdit: OffsetEdit, textModel: ITextModel): InlineSuggestionItem | undefined;
    abstract withIdentity(identity: InlineSuggestionIdentity): InlineSuggestionItem;
    abstract canBeReused(model: ITextModel, position: Position): boolean;
    addRef(): void;
    removeRef(): void;
    reportInlineEditShown(commandService: ICommandService): void;
    reportPartialAccept(acceptedCharacters: number, info: PartialAcceptInfo): void;
    reportEndOfLife(reason: InlineCompletionEndOfLifeReason): void;
    setEndOfLifeReason(reason: InlineCompletionEndOfLifeReason): void;
    getSourceCompletion(): InlineCompletion;
}
export declare class InlineSuggestionIdentity {
    private static idCounter;
    private readonly _onDispose;
    readonly onDispose: IObservable<void>;
    private _refCount;
    readonly id: string;
    addRef(): void;
    removeRef(): void;
}
declare class InlineSuggestDisplayLocation implements IDisplayLocation {
    private readonly _offsetRange;
    readonly range: Range;
    readonly label: string;
    static create(displayLocation: IDisplayLocation, textmodel: ITextModel): InlineSuggestDisplayLocation;
    private constructor();
    withEdit(edit: OffsetEdit, positionOffsetTransformer: PositionOffsetTransformerBase): InlineSuggestDisplayLocation | undefined;
}
export declare class InlineCompletionItem extends InlineSuggestionItemBase {
    private readonly _edit;
    private readonly _textEdit;
    private readonly _originalRange;
    readonly snippetInfo: SnippetInfo | undefined;
    readonly additionalTextEdits: readonly ISingleEditOperation[];
    static create(data: InlineSuggestData, textModel: ITextModel): InlineCompletionItem;
    readonly isInlineEdit = false;
    private constructor();
    getSingleTextEdit(): SingleTextEdit;
    withIdentity(identity: InlineSuggestionIdentity): InlineCompletionItem;
    withEdit(textModelEdit: OffsetEdit, textModel: ITextModel): InlineCompletionItem | undefined;
    canBeReused(model: ITextModel, position: Position): boolean;
    isVisible(model: ITextModel, cursorPosition: Position): boolean;
}
export declare class InlineEditItem extends InlineSuggestionItemBase {
    private readonly _edit;
    private readonly _textEdit;
    private readonly _edits;
    private readonly _lastChangePartOfInlineEdit;
    private readonly _inlineEditModelVersion;
    static create(data: InlineSuggestData, textModel: ITextModel): InlineEditItem;
    readonly snippetInfo: SnippetInfo | undefined;
    readonly additionalTextEdits: readonly ISingleEditOperation[];
    readonly isInlineEdit = true;
    private constructor();
    get updatedEditModelVersion(): number;
    get updatedEdit(): OffsetEdit;
    getSingleTextEdit(): SingleTextEdit;
    withIdentity(identity: InlineSuggestionIdentity): InlineEditItem;
    canBeReused(model: ITextModel, position: Position): boolean;
    withEdit(textModelChanges: OffsetEdit, textModel: ITextModel): InlineEditItem | undefined;
    private _applyTextModelChanges;
}
export {};
