import { Disposable, IDisposable } from "../../../../../base/common/lifecycle.js";
import { IObservable, IObservableWithChange, IReader, ITransaction } from "../../../../../base/common/observable.js";
import { IConfigurationService } from "../../../../../platform/configuration/common/configuration.service.js";
import { IInstantiationService } from "../../../../../platform/instantiation/common/instantiation.js";
import { ILogService } from "../../../../../platform/log/common/log.service.js";
import { OffsetEdit } from "../../../../common/core/offsetEdit.js";
import { Position } from "../../../../common/core/position.js";
import { Range } from "../../../../common/core/range.js";
import { SingleTextEdit } from "../../../../common/core/textEdit.js";
import { InlineCompletionContext } from "../../../../common/languages.js";
import { ILanguageConfigurationService } from "../../../../common/languages/languageConfigurationRegistry.service.js";
import { ITextModel } from "../../../../common/model.js";
import { IFeatureDebounceInformation } from "../../../../common/services/languageFeatureDebounce.js";
import { ILanguageFeaturesService } from "../../../../common/services/languageFeatures.service.js";
import { IModelContentChangedEvent } from "../../../../common/textModelEvents.js";
import { InlineCompletionItem, InlineCompletionProviderResult } from "./provideInlineCompletions.js";
export declare class InlineCompletionsSource extends Disposable {
    private readonly _textModel;
    private readonly _versionId;
    private readonly _debounceValue;
    private readonly _languageFeaturesService;
    private readonly _languageConfigurationService;
    private readonly _logService;
    private readonly _configurationService;
    private readonly _instantiationService;
    private static _requestId;
    private readonly _updateOperation;
    readonly inlineCompletions: import("../../../../../base/common/observable.js").ISettableObservable<UpToDateInlineCompletions | undefined, void> & IDisposable;
    readonly suggestWidgetInlineCompletions: import("../../../../../base/common/observable.js").ISettableObservable<UpToDateInlineCompletions | undefined, void> & IDisposable;
    private readonly _loggingEnabled;
    private readonly _structuredFetchLogger;
    constructor(_textModel: ITextModel, _versionId: IObservableWithChange<number | null, IModelContentChangedEvent | undefined>, _debounceValue: IFeatureDebounceInformation, _languageFeaturesService: ILanguageFeaturesService, _languageConfigurationService: ILanguageConfigurationService, _logService: ILogService, _configurationService: IConfigurationService, _instantiationService: IInstantiationService);
    readonly clearOperationOnTextModelChange: IObservable<undefined>;
    private _log;
    private readonly _loadingCount;
    readonly loading: IObservable<boolean>;
    fetch(position: Position, context: InlineCompletionContext, activeInlineCompletion: InlineCompletionWithUpdatedRange | undefined, withDebounce: boolean, userJumpedToActiveCompletion: IObservable<boolean>): Promise<boolean>;
    clear(tx: ITransaction): void;
    clearSuggestWidgetInlineCompletions(tx: ITransaction): void;
    cancelUpdate(): void;
}
declare class UpdateRequest {
    readonly position: Position;
    readonly context: InlineCompletionContext;
    readonly versionId: number;
    constructor(position: Position, context: InlineCompletionContext, versionId: number);
    satisfies(other: UpdateRequest): boolean;
    get isExplicitRequest(): boolean;
}
export declare class UpToDateInlineCompletions implements IDisposable {
    private readonly inlineCompletionProviderResult;
    readonly request: UpdateRequest;
    private readonly _textModel;
    private readonly _versionId;
    private readonly _inlineCompletions;
    get inlineCompletions(): ReadonlyArray<InlineCompletionWithUpdatedRange>;
    private _refCount;
    private readonly _prependedInlineCompletionItems;
    constructor(inlineCompletionProviderResult: InlineCompletionProviderResult, request: UpdateRequest, _textModel: ITextModel, _versionId: IObservableWithChange<number | null, IModelContentChangedEvent | undefined>);
    clone(): this;
    dispose(): void;
    prepend(inlineCompletion: InlineCompletionItem, range: Range, addRefToSource: boolean): void;
}
export declare class InlineCompletionWithUpdatedRange extends Disposable {
    readonly inlineCompletion: InlineCompletionItem;
    private readonly _textModel;
    private readonly _modelVersion;
    readonly request: UpdateRequest;
    readonly semanticId: string;
    get forwardStable(): boolean;
    private readonly _updatedEditObj;
    get updatedEdit(): IObservable<OffsetEdit | undefined>;
    get updatedEditModelVersion(): number;
    get source(): import("./provideInlineCompletions.js").InlineCompletionList;
    get sourceInlineCompletion(): import("../../../../common/languages.js").InlineCompletion;
    get isInlineEdit(): boolean;
    constructor(inlineCompletion: InlineCompletionItem, updatedRange: Range | undefined, _textModel: ITextModel, _modelVersion: IObservableWithChange<number | null, IModelContentChangedEvent | undefined>, request: UpdateRequest);
    toInlineCompletion(reader: IReader | undefined): InlineCompletionItem;
    toSingleTextEdit(reader: IReader | undefined): SingleTextEdit;
    isVisible(model: ITextModel, cursorPosition: Position, reader: IReader | undefined): boolean;
    reuse(): void;
    canBeReused(model: ITextModel, position: Position): boolean;
    private readonly _updatedRange;
    private _toUpdatedEdit;
    private _toInlineCompletionEdit;
    private _toInlineEditEdit;
}
export {};
