import { IRPCProtocol } from '@opensumi/ide-connection';
import { Disposable, Emitter, Event, IRange, ISelection } from '@opensumi/ide-core-common';
import { ExtensionDocumentDataManager, IExtensionHostEditorService } from '../../../../common/vscode';
import { IEditorChangeDTO, IEditorCreatedDTO, IEditorStatusChangeDTO, IMainThreadEditorsService, IResolvedTextEditorConfiguration, TextEditorCursorStyle } from '../../../../common/vscode/editor';
import { Position, Range, TextEditorLineNumbersStyle, Uri } from '../../../../common/vscode/ext-types';
import type { IResourceOpenOptions } from '@opensumi/ide-editor';
import type vscode from 'vscode';
export declare class ExtensionHostEditorService implements IExtensionHostEditorService {
    readonly documents: ExtensionDocumentDataManager;
    private _editors;
    private _activeEditorId;
    private decorationIdCount;
    readonly _onDidChangeActiveTextEditor: Emitter<vscode.TextEditor | undefined>;
    readonly _onDidChangeVisibleTextEditors: Emitter<vscode.TextEditor[]>;
    readonly _onDidChangeTextEditorSelection: Emitter<vscode.TextEditorSelectionChangeEvent>;
    readonly _onDidChangeTextEditorVisibleRanges: Emitter<vscode.TextEditorVisibleRangesChangeEvent>;
    readonly _onDidChangeTextEditorOptions: Emitter<vscode.TextEditorOptionsChangeEvent>;
    readonly _onDidChangeTextEditorViewColumn: Emitter<vscode.TextEditorViewColumnChangeEvent>;
    readonly onDidChangeActiveTextEditor: Event<vscode.TextEditor | undefined>;
    readonly onDidChangeVisibleTextEditors: Event<vscode.TextEditor[]>;
    readonly onDidChangeTextEditorSelection: Event<vscode.TextEditorSelectionChangeEvent>;
    readonly onDidChangeTextEditorVisibleRanges: Event<vscode.TextEditorVisibleRangesChangeEvent>;
    readonly onDidChangeTextEditorOptions: Event<vscode.TextEditorOptionsChangeEvent>;
    readonly onDidChangeTextEditorViewColumn: Event<vscode.TextEditorViewColumnChangeEvent>;
    readonly _proxy: IMainThreadEditorsService;
    private _onEditorCreated;
    private onEditorCreated;
    constructor(rpcProtocol: IRPCProtocol, documents: ExtensionDocumentDataManager);
    $acceptChange(change: IEditorChangeDTO): void;
    openResource(uri: Uri, options: IResourceOpenOptions): Promise<vscode.TextEditor>;
    showTextDocument(documentOrUri: vscode.TextDocument | Uri, columnOrOptions?: vscode.ViewColumn | vscode.TextDocumentShowOptions, preserveFocus?: boolean): Promise<vscode.TextEditor>;
    $acceptPropertiesChanges(changes: IEditorStatusChangeDTO[]): void;
    getEditor(id: string): TextEditorData | undefined;
    get activeEditor(): TextEditorData | undefined;
    get visibleEditors(): vscode.TextEditor[];
    closeEditor(editor: TextEditorData): void;
    getNextId(): string;
    createTextEditorDecorationType(extensionId: string, options: vscode.DecorationRenderOptions): vscode.TextEditorDecorationType;
    getDiffInformation(id: string): Promise<vscode.LineChange[]>;
}
export declare class ExtHostTextEditorDecorationType extends Disposable implements vscode.TextEditorDecorationType {
    readonly key: string;
    constructor(key: string, _proxy: IMainThreadEditorsService);
}
export declare class TextEditorData {
    readonly editorService: ExtensionHostEditorService;
    readonly documents: ExtensionDocumentDataManager;
    readonly id: string;
    readonly group: string;
    constructor(created: IEditorCreatedDTO, editorService: ExtensionHostEditorService, documents: ExtensionDocumentDataManager);
    readonly uri: Uri;
    selections: vscode.Selection[];
    visibleRanges: vscode.Range[];
    options: ExtHostTextEditorOptions;
    viewColumn?: vscode.ViewColumn | undefined;
    private _textEditor;
    edit(callback: (editBuilder: vscode.TextEditorEdit) => void, options?: {
        undoStopBefore: boolean;
        undoStopAfter: boolean;
    }): Promise<boolean>;
    private _applyEdit;
    insertSnippet(snippet: vscode.SnippetString, location?: Range | Position | Position[] | Range[] | undefined, options?: {
        undoStopBefore: boolean;
        undoStopAfter: boolean;
    } | undefined): Promise<boolean>;
    setDecorations(decorationType: ExtHostTextEditorDecorationType, rangesOrOptions: vscode.Range[] | vscode.DecorationOptions[]): void;
    revealRange(range: vscode.Range, revealType?: vscode.TextEditorRevealType | undefined): void;
    show(column?: vscode.ViewColumn | undefined): void;
    hide(): void;
    _acceptSelections(selections?: ISelection[]): void;
    _acceptOptions(options: IResolvedTextEditorConfiguration): void;
    _acceptVisibleRanges(value: IRange[]): void;
    _acceptViewColumn(value: number): void;
    acceptStatusChange(change: IEditorStatusChangeDTO): void;
    doSetSelection: () => void;
    get textEditor(): vscode.TextEditor;
}
export declare function toIRange(range: vscode.Range | vscode.Selection | vscode.Position): IRange;
export declare class ExtHostTextEditorOptions implements vscode.TextEditorOptions {
    private _proxy;
    private _id;
    private _tabSize;
    private _indentSize;
    private _insertSpaces;
    private _cursorStyle;
    private _lineNumbers;
    constructor(proxy: IMainThreadEditorsService, id: string, source: IResolvedTextEditorConfiguration);
    _accept(source: IResolvedTextEditorConfiguration): void;
    get tabSize(): number | string;
    set tabSize(value: number | string);
    private _validateTabSize;
    get indentSize(): number | string;
    set indentSize(value: number | string);
    private _validateIndentSize;
    get insertSpaces(): boolean | string;
    set insertSpaces(value: boolean | string);
    private _validateInsertSpaces;
    get cursorStyle(): TextEditorCursorStyle;
    set cursorStyle(value: TextEditorCursorStyle);
    get lineNumbers(): TextEditorLineNumbersStyle;
    set lineNumbers(value: TextEditorLineNumbersStyle);
    assign(newOptions: vscode.TextEditorOptions): void;
}
//# sourceMappingURL=editor.host.d.ts.map