import { DragEvent, MouseEvent } from 'react';
import { Injector } from '@opensumi/di';
import { DecorationsManager, IRecycleTreeHandle, PromptValidateMessage, TreeNodeType } from '@opensumi/ide-components';
import { CancellationToken } from '@opensumi/ide-core-common';
import { ITreeViewRevealOptions, ITreeViewsService as ITreeViewsServiceCommon, TreeViewBaseOptions, TreeViewItem } from '../../../../common/vscode';
import { VSDataTransfer } from '../../../../common/vscode/data-transfer';
import { TreeViewDataProvider, TreeViewDragAndDropController } from '../main.thread.treeview';
import { ExtensionTreeModel } from './tree-view.model';
import { ExtensionCompositeTreeNode, ExtensionTreeNode } from './tree-view.node.defined';
export declare const IExtensionTreeViewModel: unique symbol;
export declare const ITreeViewId: unique symbol;
export declare const ITreeViewBaseOptions: unique symbol;
export declare const ITreeViewDragAndDropController: unique symbol;
export interface ITreeViewDragAndDropController {
    readonly dropMimeTypes: string[];
    readonly dragMimeTypes: string[];
    handleDrag(sourceTreeItemHandles: string[], operationUuid: string, token: CancellationToken): Promise<VSDataTransfer | undefined>;
    handleDrop(elements: VSDataTransfer, target: ExtensionTreeNode | ExtensionCompositeTreeNode | undefined, token: CancellationToken, operationUuid?: string, sourceTreeId?: string, sourceTreeItemHandles?: string[]): Promise<void>;
}
export interface IExtensionTreeHandle extends IRecycleTreeHandle {
    hasDirectFocus: () => boolean;
}
export interface ExtensionTreeValidateMessage extends PromptValidateMessage {
    value: string;
}
export type ITreeViewsService = ITreeViewsServiceCommon<VSDataTransfer, TreeViewItem, HTMLElement>;
export declare const ITreeViewsService: unique symbol;
export declare class ExtensionTreeViewModel {
    static DEFAULT_REVEAL_DELAY: number;
    static MS_TILL_DRAGGED_OVER_EXPANDS: number;
    static createContainer(injector: Injector, tree: TreeViewDataProvider, dndController: TreeViewDragAndDropController, treeViewId: string, options: TreeViewBaseOptions): Injector;
    static createModel(injector: Injector, tree: TreeViewDataProvider, dndController: TreeViewDragAndDropController, treeViewId: string, options: TreeViewBaseOptions): ExtensionTreeViewModel;
    private readonly injector;
    private readonly treeViewDataProvider;
    private readonly treeViewDragAndDropController;
    private readonly preferenceService;
    readonly treeViewId: string;
    readonly treeViewOptions: TreeViewBaseOptions;
    private readonly menuService;
    private readonly contextKeyService;
    private readonly commandService;
    private readonly labelService;
    private readonly logger;
    private readonly treeViewsDragAndDropService;
    private _treeModel;
    private _whenReady;
    private _decorations;
    private _extensionTreeHandle;
    private selectedDecoration;
    private focusedDecoration;
    private contextMenuDecoration;
    private loadingDecoration;
    private draggingDecoration;
    private draggedOverDecoration;
    private potentialParent;
    private beingDraggedNodes;
    private _focusedNode;
    private _selectedNodes;
    private _contextMenuNode;
    private clickTimes;
    private clickTimer;
    private disposableCollection;
    private onDidFocusedNodeChangeEmitter;
    private onDidSelectedNodeChangeEmitter;
    private onDidChangeExpansionStateEmitter;
    private _isMultiSelected;
    private revealDelayer;
    private toCancelNodeExpansion;
    private draggedOverNode;
    private dragOverTrigger;
    private dragCancellationToken;
    private readonly treeItemsTransfer;
    private readonly treeMimeType;
    private treeHandlerReadyDeffer;
    constructor();
    get draggable(): boolean;
    get onDidFocusedNodeChange(): import("@opensumi/ide-core-browser").Event<string | void>;
    get onDidChangeExpansionState(): import("@opensumi/ide-core-browser").Event<{
        treeItemId: string;
        expanded: boolean;
    }>;
    get onDidSelectedNodeChange(): import("@opensumi/ide-core-browser").Event<string[]>;
    get extensionTreeHandle(): IExtensionTreeHandle;
    get decorations(): DecorationsManager;
    get treeModel(): ExtensionTreeModel;
    get whenReady(): Promise<void>;
    get focusedNode(): ExtensionCompositeTreeNode | ExtensionTreeNode | undefined;
    get selectedNodes(): (ExtensionCompositeTreeNode | ExtensionTreeNode)[];
    get contextMenuNode(): ExtensionCompositeTreeNode | ExtensionTreeNode | undefined;
    initTreeModel(): Promise<void>;
    updateTreeModel(): Promise<void>;
    initDecorations(root: any): void;
    clearNodeSelectedDecoration: () => void;
    activeNodeDecoration: (target: ExtensionTreeNode | ExtensionCompositeTreeNode) => void;
    activeNodeFocusedDecoration: (target: ExtensionTreeNode | ExtensionCompositeTreeNode, removePreFocusedDecoration?: boolean, clearSelection?: boolean) => void;
    activeNodeActivedDecoration: (target: ExtensionTreeNode | ExtensionCompositeTreeNode) => void;
    selectNodeDecoration: (target: ExtensionTreeNode | ExtensionCompositeTreeNode, dispatchChange?: boolean) => void;
    activeNodeSelectedDecoration: (target: ExtensionTreeNode | ExtensionCompositeTreeNode) => void;
    activeNodeDecorationByRange: (begin: number, end: number) => void;
    enactiveNodeDecoration: () => void;
    toggleDirectory: (item: ExtensionCompositeTreeNode) => Promise<void>;
    removeNodeDecoration(): void;
    handleTreeHandler(handle: IExtensionTreeHandle): void;
    handleTreeBlur: () => void;
    handleTreeFocus: () => void;
    getDragURI(element: ExtensionTreeNode | ExtensionCompositeTreeNode): string | null;
    getDragLabel(elements: (ExtensionTreeNode | ExtensionCompositeTreeNode)[]): string | undefined;
    private handleDragAndLog;
    private addExtensionProvidedTransferTypes;
    private addResourceInfoToTransfer;
    handleDragStart: (event: DragEvent, node: ExtensionTreeNode | ExtensionCompositeTreeNode) => void;
    handleDragEnter: (event: DragEvent, _node: ExtensionTreeNode | ExtensionCompositeTreeNode) => void;
    handleDrop: (event: DragEvent, node: ExtensionTreeNode | ExtensionCompositeTreeNode) => Promise<void>;
    handleDragOver: (event: DragEvent, node: ExtensionTreeNode | ExtensionCompositeTreeNode) => void;
    handleDragLeave: (event: DragEvent, _node: ExtensionTreeNode | ExtensionCompositeTreeNode) => void;
    handleDragEnd: (event: DragEvent, node: ExtensionTreeNode | ExtensionCompositeTreeNode) => void;
    handleItemRangeClick: (item: ExtensionTreeNode | ExtensionCompositeTreeNode, type: TreeNodeType) => void;
    handleItemToggleClick: (item: ExtensionTreeNode | ExtensionCompositeTreeNode, type: TreeNodeType) => void;
    handleItemClick: (item: ExtensionTreeNode | ExtensionCompositeTreeNode, type: TreeNodeType) => Promise<void>;
    handleContextMenu: (ev: MouseEvent, item?: ExtensionCompositeTreeNode | ExtensionTreeNode) => void;
    private getCtxMenuNodes;
    private getMenuNodes;
    getInlineMenuNodes(viewItemValue: string): import("@opensumi/ide-core-browser/lib/menu/next").MenuNode[];
    collapseAll(): void;
    refreshById(treeItemId: string): Promise<void>;
    refresh(item?: TreeViewItem): Promise<void>;
    reveal(treeItemId: string, options?: ITreeViewRevealOptions): Promise<void>;
    handleCheckBoxChange: (item: ExtensionCompositeTreeNode | ExtensionTreeNode) => Promise<void>;
}
//# sourceMappingURL=tree-view.model.service.d.ts.map