import { IRPCProtocol } from '@opensumi/ide-connection';
import { Disposable, URI } from '@opensumi/ide-core-common';
import { IResource, WorkbenchEditorService } from '@opensumi/ide-editor';
import { EditorGroup } from '@opensumi/ide-editor/lib/browser/workbench-editor.service';
import { IEditorTabDto, IEditorTabGroupDto, IExtHostEditorTabsShape, IMainThreadEditorTabsShape } from './../../../common/vscode/editor-tabs';
export interface ITabInfo {
    name: string;
    resource: URI;
}
export declare class MainThreadEditorTabsService extends Disposable implements IMainThreadEditorTabsShape {
    private rpcProtocol;
    private workbenchEditorService;
    private readonly proxy;
    constructor(rpcProtocol: IRPCProtocol);
    $initializeState(): void;
    $moveTab(tabId: string, index: number, viewColumn: number, preserveFocus?: boolean | undefined): void;
    $closeTab(tabIds: string[], preserveFocus?: boolean | undefined): Promise<boolean>;
    $closeGroup(groupIds: number[], preservceFocus?: boolean | undefined): Promise<boolean>;
    private findEditorTabData;
    private prevEditorGroups;
    private groupDataStore;
    private tabStore;
    getOrCreateGroupData(group: EditorGroup): EditorTabGroupData;
    private updateGroups;
}
declare class EditorTabDtoData {
    readonly group: EditorGroup;
    resource: IResource;
    private _dto;
    constructor(group: EditorGroup, resource: IResource);
    updateResource(resource: IResource): void;
    /**
     * @param updateDto
     */
    tryUpdate(): false | true;
    get dto(): IEditorTabDto;
    static getTabId(editorGroup: EditorGroup, resource: IResource): string;
    get index(): number;
    static from(editorGroup: EditorGroup, resource: IResource): IEditorTabDto;
}
declare class EditorTabDtoDataStore {
    all: Map<string, EditorTabDtoData>;
    private mapByUri;
    getOrCreateData(group: EditorGroup, resource: IResource): EditorTabDtoData;
    removeData(id: string): void;
    getByResourceUri(uri: URI): EditorTabDtoData[];
}
declare class EditorTabGroupData extends Disposable {
    readonly editorGroup: EditorGroup;
    private editorService;
    private store;
    private proxy;
    tabs: EditorTabDtoData[];
    constructor(editorGroup: EditorGroup, editorService: WorkbenchEditorService, store: EditorTabDtoDataStore, proxy: IExtHostEditorTabsShape);
    init(): void;
    onTabsMayUpdated(): void;
    tryCheckUpdate(): void;
    private _data;
    get dto(): Omit<IEditorTabGroupDto, 'tabs'>;
}
export {};
//# sourceMappingURL=main.thread.editor-tabs.d.ts.map