import { CompositeTreeNode, ITreeNodeOrCompositeTreeNode, Tree } from '@opensumi/ide-components';
import { IRPCProtocol } from '@opensumi/ide-connection';
import { BinaryBuffer, CancellationToken, Disposable, Event, IContextKeyService, LabelService, URI, WithEventBus } from '@opensumi/ide-core-browser';
import { AbstractMenuService } from '@opensumi/ide-core-browser/lib/menu/next';
import { IFileServiceClient } from '@opensumi/ide-file-service';
import { IIconService, IThemeService } from '@opensumi/ide-theme';
import { ExtensionHostType } from '../../../common';
import { IExtHostTreeView, IMainThreadTreeView, ITreeViewRevealOptions, TreeViewBaseOptions, TreeViewItem, ViewBadge } from '../../../common/vscode';
import { VSDataTransfer } from '../../../common/vscode/data-transfer';
import { ExtensionTreeViewModel, ITreeViewDragAndDropController } from './tree-view/tree-view.model.service';
import { ExtensionCompositeTreeNode, ExtensionTreeNode, ExtensionTreeRoot } from './tree-view/tree-view.node.defined';
export declare class MainThreadTreeView extends WithEventBus implements IMainThreadTreeView {
    private rpcProtocol;
    private extensionHostType;
    static TREE_VIEW_COLLAPSE_ALL_COMMAND_ID: string;
    static TREE_VIEW_COLLAPSE_ALL_COMMAND_ID_WORKER: string;
    private readonly proxy;
    private readonly mainLayoutService;
    private readonly iconService;
    private readonly menuRegistry;
    private readonly commandRegistry;
    private readonly themeService;
    private readonly progressService;
    private readonly labelService;
    private readonly contextKeyService;
    private readonly menuService;
    protected fileServiceClient: IFileServiceClient;
    private readonly injector;
    private userhome?;
    readonly treeModels: Map<string, ExtensionTreeViewModel>;
    readonly dndControllers: Map<string, TreeViewDragAndDropController>;
    private disposableCollection;
    private disposable;
    constructor(rpcProtocol: IRPCProtocol, extensionHostType: ExtensionHostType);
    dispose(): void;
    createTreeModel(treeViewId: string, dataProvider: TreeViewDataProvider, dndController: TreeViewDragAndDropController, options: TreeViewBaseOptions): ExtensionTreeViewModel;
    $registerTreeDataProvider(treeViewId: string, options: TreeViewBaseOptions): Promise<void>;
    $unregisterTreeDataProvider(treeViewId: string): Promise<void>;
    $resolveDropFileData(treeViewId: string, requestId: number, dataItemId: string): Promise<BinaryBuffer>;
    $refresh(treeViewId: string, itemsToRefresh?: TreeViewItem): Promise<void>;
    $setTitle(treeViewId: string, title: string): Promise<void>;
    $setDescription(treeViewId: string, description: string): Promise<void>;
    $setBadge(treeViewId: string, badge?: ViewBadge): Promise<void>;
    $setMessage(treeViewId: string, message: string): Promise<void>;
    $reveal(treeViewId: string, treeItemId?: string, options?: ITreeViewRevealOptions): Promise<void>;
    private _registerInternalCommands;
}
export declare class TreeViewDataProvider extends Tree {
    readonly treeViewId: string;
    private readonly proxy;
    private readonly iconService;
    private readonly themeService;
    private readonly labelService;
    private readonly contextKeyService;
    private readonly menuService;
    private readonly userhome?;
    private cachedMenu;
    private onTreeDataChangedEmitter;
    private onRevealChangedEmitter;
    private isEmpty;
    private _onDidChangeEmpty;
    onDidChangeEmpty: Event<void>;
    private treeItemId2TreeNode;
    constructor(treeViewId: string, proxy: IExtHostTreeView, iconService: IIconService, themeService: IThemeService, labelService: LabelService, contextKeyService: IContextKeyService, menuService: AbstractMenuService, userhome?: URI | undefined);
    get isTreeEmpty(): boolean;
    get onTreeDataChanged(): Event<any>;
    get onRevealChanged(): Event<any>;
    get root(): CompositeTreeNode | undefined;
    getTreeNodeIdByTreeItemId(treeItemId: string): number | undefined;
    private getReadableDescription;
    private getLabelAndDescription;
    createFoldNode(item: TreeViewItem, parent: ExtensionCompositeTreeNode): Promise<ExtensionCompositeTreeNode>;
    createNormalNode(item: TreeViewItem, parent: ExtensionCompositeTreeNode): Promise<ExtensionTreeNode>;
    private isBase64Icon;
    toIconClass(item: TreeViewItem): Promise<string | undefined>;
    private getInlineMenuNodes;
    /**
     * 创建节点
     *
     * @param item tree view item from the ext
     */
    createTreeNode(item: TreeViewItem, parent: ExtensionCompositeTreeNode): Promise<ExtensionCompositeTreeNode | ExtensionTreeNode>;
    resolveChildren(parent?: ExtensionCompositeTreeNode): Promise<(ExtensionCompositeTreeNode | ExtensionTreeRoot | ExtensionTreeNode)[]>;
    resolveTreeItem(treeViewId: string, treeItemId: string): Promise<TreeViewItem | undefined>;
    sortComparator(a: ITreeNodeOrCompositeTreeNode, b: ITreeNodeOrCompositeTreeNode): 0 | 1 | -1;
    refresh(itemsToRefresh?: TreeViewItem): Promise<void>;
    reveal(viewItemId?: any): Promise<void>;
    setSelection(treeViewId: string, id: string[]): Promise<void>;
    setExpanded(treeViewId: string, id: any, expanded: boolean): Promise<void>;
    setVisible(treeViewId: string, visible: boolean): Promise<void>;
    dispose(): void;
    markAsChecked(node: ExtensionTreeNode | ExtensionCompositeTreeNode, checked: boolean, manageCheckboxStateManually?: boolean): void;
}
export declare class TreeViewDragAndDropController extends Disposable implements ITreeViewDragAndDropController {
    readonly treeViewId: string;
    readonly dropMimeTypes: string[];
    readonly dragMimeTypes: string[];
    readonly hasHandleDrag: boolean;
    private readonly _proxy;
    private readonly dataTransfersCache;
    constructor(treeViewId: string, dropMimeTypes: string[] | undefined, dragMimeTypes: string[] | undefined, hasHandleDrag: boolean, _proxy: IExtHostTreeView);
    handleDrop(dataTransfer: VSDataTransfer, targetTreeItem: ExtensionTreeNode | ExtensionCompositeTreeNode | undefined, token: CancellationToken, operationUuid?: string, sourceTreeId?: string, sourceTreeItemHandles?: string[]): Promise<void>;
    handleDrag(sourceTreeItemHandles: string[], operationUuid: string, token: CancellationToken): Promise<VSDataTransfer | undefined>;
    resolveDropFileData(requestId: number, dataItemId: string): Promise<BinaryBuffer>;
}
//# sourceMappingURL=main.thread.treeview.d.ts.map