import { CommentReaction, CommentReactionClick, IThreadComment } from '@opensumi/ide-comments';
import { IRPCProtocol } from '@opensumi/ide-connection';
import { CancellationToken, Disposable, Event, IDisposable, IRange, URI, WithEventBus } from '@opensumi/ide-core-common';
import { CommentInput, CommentThread, CommentThreadState, CommentReaction as CoreCommentReaction } from '@opensumi/monaco-editor-core/esm/vs/editor/common/languages';
import { CommentProviderFeatures, IExtHostComments, IMainThreadCommands, IMainThreadComments } from '../../../common/vscode';
import { CommentThreadChanges, CommentThreadCollapsibleState, Comment as CoreComment, UriComponents } from '../../../common/vscode/models';
export declare class MainThreadComments implements IDisposable, IMainThreadComments {
    private rpcProtocol;
    private mainThreadCommands;
    private commentsService;
    private readonly injector;
    private proxy;
    private _providers;
    private _commentControllers;
    private disposable;
    constructor(rpcProtocol: IRPCProtocol, mainThreadCommands: IMainThreadCommands);
    private registerCommentThreadTemplateHander;
    private registerArgumentProcessor;
    $updateCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, changes: Partial<{
        range: IRange;
        label: string;
        contextValue: string;
        comments: CoreComment[];
        collapseState: CommentThreadCollapsibleState;
    }>): void;
    $registerCommentController(handle: number, id: string, label: string): void;
    $updateCommentControllerFeatures(handle: number, features: CommentProviderFeatures): void;
    $unregisterCommentController(handle: number): void;
    $createCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, range: IRange, extensionId: string): CommentThread | undefined;
    $deleteCommentThread(handle: number, commentThreadHandle: number): void;
    dispose(): void;
}
export declare class MainThreadCommentThread extends Disposable implements CommentThread {
    commentThreadHandle: number;
    controllerHandle: number;
    extensionId: string;
    threadId: string;
    resource: string;
    private commentsService;
    private _input?;
    get input(): CommentInput | undefined;
    set input(value: CommentInput | undefined);
    private readonly _onDidChangeInput;
    get onDidChangeInput(): Event<CommentInput | undefined>;
    get label(): string | undefined;
    set label(label: string | undefined);
    get contextValue(): string | undefined;
    set contextValue(context: string | undefined);
    private readonly _onDidChangeLabel;
    readonly onDidChangeLabel: Event<string | undefined>;
    convertToIThreadComment(comment: CoreComment): IThreadComment;
    convertToCommentReaction(reaction: CoreCommentReaction): CommentReaction;
    convertToCoreReaction(reaction: CommentReaction): CoreCommentReaction;
    convertToCoreComment(comment: IThreadComment): CoreComment;
    get comments(): CoreComment[] | undefined;
    set comments(newComments: CoreComment[] | undefined);
    private readonly _onDidChangeComments;
    get onDidChangeComments(): Event<CoreComment[] | undefined>;
    set range(range: IRange);
    get range(): IRange;
    private readonly _onDidChangeCanReply;
    get onDidChangeCanReply(): Event<boolean>;
    set canReply(state: boolean);
    get canReply(): boolean;
    private readonly _onDidChangeRange;
    onDidChangeRange: Event<IRange>;
    private _collapsibleState;
    get collapsibleState(): CommentThreadCollapsibleState | undefined;
    set collapsibleState(newState: CommentThreadCollapsibleState | undefined);
    private readonly _onDidChangeCollasibleState;
    onDidChangeCollasibleState: Event<CommentThreadCollapsibleState | undefined>;
    private _isDisposed;
    get isDisposed(): boolean;
    private _thread;
    constructor(commentThreadHandle: number, controllerHandle: number, extensionId: string, threadId: string, resource: string, _range: IRange, _canReply: boolean);
    initialCollapsibleState?: CommentThreadCollapsibleState | undefined;
    onDidChangeInitialCollapsibleState: Event<CommentThreadCollapsibleState | undefined>;
    isDocumentCommentThread(): this is CommentThread<IRange>;
    state?: CommentThreadState | undefined;
    onDidChangeCollapsibleState: Event<CommentThreadCollapsibleState | undefined>;
    onDidChangeState: Event<CommentThreadState | undefined>;
    isTemplate: boolean;
    batchUpdate(changes: CommentThreadChanges): void;
    dispose(): void;
    toJSON(): any;
}
export declare class MainThreadCommentController extends WithEventBus {
    private readonly _proxy;
    private readonly _handle;
    private readonly _id;
    private readonly _label;
    private _features;
    private readonly injector;
    private commentsService;
    private readonly commentsFeatureRegistry;
    get handle(): number;
    get id(): string;
    get contextValue(): string;
    get proxy(): IExtHostComments;
    get label(): string;
    private _reactions;
    get reactions(): CoreCommentReaction[] | undefined;
    set reactions(reactions: CoreCommentReaction[] | undefined);
    private readonly _threads;
    activeCommentThread?: MainThreadCommentThread;
    get features(): CommentProviderFeatures;
    constructor(_proxy: IExtHostComments, _handle: number, _id: string, _label: string, _features: CommentProviderFeatures);
    updateFeatures(features: CommentProviderFeatures): void;
    createCommentThread(extensionId: string, commentThreadHandle: number, threadId: string, resource: UriComponents, range: IRange): CommentThread;
    updateCommentThread(commentThreadHandle: number, _threadId: string, _resource: UriComponents, changes: CommentThreadChanges): void;
    deleteCommentThread(commentThreadHandle: number): void;
    deleteCommentThreadMain(commentThreadId: string): void;
    private getKnownThread;
    getCommentingRanges(resource: URI, token: CancellationToken): Promise<IRange[]>;
    handleCommentReaction(e: CommentReactionClick): void;
    toggleReaction(uri: URI, thread: CommentThread, comment: CoreComment, reaction: CoreCommentReaction): Promise<void>;
    createCommentThreadTemplate(resource: UriComponents, range: IRange): void;
    updateCommentThreadTemplate(threadHandle: number, range: IRange): Promise<void>;
    toJSON(): any;
}
//# sourceMappingURL=main.thread.comments.d.ts.map