import { IRPCProtocol } from '@opensumi/ide-connection';
import { CancellationToken, IRange } from '@opensumi/ide-core-common';
import { ExtensionDocumentDataManager, IExtHostCommands, IExtensionDescription } from '../../../common/vscode';
import { IExtHostComments, IMainThreadComments } from '../../../common/vscode/comments';
import * as models from '../../../common/vscode/models';
import type { UriComponents } from '@opensumi/ide-core-common';
import type vscode from 'vscode';
type ReactionHandler = (comment: vscode.Comment, reaction: vscode.CommentReaction) => Promise<void>;
export declare function createCommentsApiFactory(extension: IExtensionDescription, extHostComments: ExtHostComments): typeof vscode.comments;
export declare class ExtHostComments implements IExtHostComments {
    private readonly rpcProtocol;
    private readonly _documents;
    private static handlePool;
    private readonly _proxy;
    private _commentControllers;
    private _commentControllersByExtension;
    constructor(rpcProtocol: IRPCProtocol, commands: IExtHostCommands, _documents: ExtensionDocumentDataManager);
    private registerArgumentProcessor;
    createCommentController(extension: IExtensionDescription, id: string, label: string): vscode.CommentController;
    $createCommentThreadTemplate(commentControllerHandle: number, uriComponents: UriComponents, range: IRange): void;
    $updateCommentThreadTemplate(commentControllerHandle: number, threadHandle: number, range: IRange): Promise<void>;
    $deleteCommentThread(commentControllerHandle: number, commentThreadHandle: number): void;
    $provideCommentingRanges(commentControllerHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise<IRange[] | undefined>;
    $toggleReaction(commentControllerHandle: number, threadHandle: number, uri: UriComponents, comment: models.Comment, reaction: models.CommentReaction): Promise<void>;
}
declare class ExtHostCommentController implements vscode.CommentController {
    private _extension;
    private _handle;
    private _proxy;
    private _id;
    private _label;
    get id(): string;
    get label(): string;
    get handle(): number;
    private _threads;
    commentingRangeProvider?: vscode.CommentingRangeProvider;
    private _reactionHandler?;
    private _options;
    get options(): vscode.CommentOptions | undefined;
    set options(options: vscode.CommentOptions | undefined);
    get reactionHandler(): ReactionHandler | undefined;
    set reactionHandler(handler: ReactionHandler | undefined);
    constructor(_extension: IExtensionDescription, _handle: number, _proxy: IMainThreadComments, _id: string, _label: string);
    createCommentThread(resource: vscode.Uri, range: vscode.Range, comments: vscode.Comment[]): vscode.CommentThread;
    $createCommentThreadTemplate(uriComponents: UriComponents, range: IRange): ExtHostCommentThread;
    $updateCommentThreadTemplate(threadHandle: number, range: IRange): void;
    $deleteCommentThread(threadHandle: number): void;
    getCommentThread(handle: number): ExtHostCommentThread | undefined;
    dispose(): void;
}
export declare class ExtHostCommentThread implements vscode.CommentThread {
    private _proxy;
    private _commentController;
    private _id;
    private _uri;
    private _range;
    private _comments;
    private static _handlePool;
    readonly handle: number;
    commentHandle: number;
    private modifications;
    set threadId(id: string);
    get threadId(): string;
    get id(): string;
    get resource(): vscode.Uri;
    get uri(): vscode.Uri;
    private readonly _onDidUpdateCommentThread;
    readonly onDidUpdateCommentThread: import("@opensumi/ide-core-common").Event<void>;
    set range(range: vscode.Range);
    get range(): vscode.Range;
    private _canReply;
    set canReply(state: boolean);
    get canReply(): boolean;
    private _label;
    get label(): string | undefined;
    set label(label: string | undefined);
    private _state;
    get state(): vscode.CommentThreadState | undefined;
    set state(newState: vscode.CommentThreadState | undefined);
    private _contextValue;
    get contextValue(): string | undefined;
    set contextValue(context: string | undefined);
    get comments(): vscode.Comment[];
    set comments(newComments: vscode.Comment[]);
    private _collapseState?;
    get collapsibleState(): vscode.CommentThreadCollapsibleState;
    set collapsibleState(newState: vscode.CommentThreadCollapsibleState);
    private _localDisposables;
    private _isDiposed;
    get isDisposed(): boolean;
    private _commentsMap;
    private _acceptInputDisposables;
    constructor(_proxy: IMainThreadComments, _commentController: ExtHostCommentController, _id: string | undefined, _uri: vscode.Uri, _range: vscode.Range, _comments: vscode.Comment[], extension: IExtensionDescription);
    eventuallyUpdateCommentThread(): void;
    getCommentByUniqueId(uniqueId: number): vscode.Comment | undefined;
    dispose(): void;
}
export {};
//# sourceMappingURL=ext.host.comments.d.ts.map