import { ICellDataForSheetInterceptor, IDisposable, IPosition, ISelectionCell, Nullable, Disposable, IContextService, InterceptorManager, IUniverInstanceService, ThemeService } from '@univerjs/core';
import { Engine, IDocumentLayoutObject, Scene, DeviceInputEventType, IRenderManagerService } from '@univerjs/engine-render';
import { ISheetLocation, SheetsSelectionsService } from '@univerjs/sheets';
import { IEditorService, KeyCode } from '@univerjs/ui';
import { Observable } from 'rxjs';
export interface IEditorBridgeServiceVisibleParam {
    visible: boolean;
    eventType: DeviceInputEventType;
    unitId: string;
    keycode?: KeyCode;
}
export interface ICurrentEditCellParam {
    scene: Scene;
    engine: Engine;
    unitId: string;
    sheetId: string;
    primary: ISelectionCell;
}
export interface IEditorBridgeServiceParam {
    unitId: string;
    sheetId: string;
    row: number;
    column: number;
    position: IPosition;
    canvasOffset: {
        left: number;
        top: number;
    };
    documentLayoutObject: IDocumentLayoutObject;
    scaleX: number;
    scaleY: number;
    editorUnitId: string;
    isInArrayFormulaRange?: Nullable<boolean>;
}
declare const BEFORE_CELL_EDIT: import('@univerjs/core').IInterceptor<ICellDataForSheetInterceptor, ISheetLocation>;
declare const AFTER_CELL_EDIT: import('@univerjs/core').IInterceptor<ICellDataForSheetInterceptor, ISheetLocation>;
declare const AFTER_CELL_EDIT_ASYNC: import('@univerjs/core').IInterceptor<Promise<Nullable<ICellDataForSheetInterceptor>>, ISheetLocation>;
export interface IEditorBridgeService {
    currentEditCellState$: Observable<Nullable<IEditorBridgeServiceParam>>;
    visible$: Observable<IEditorBridgeServiceVisibleParam>;
    interceptor: InterceptorManager<{
        BEFORE_CELL_EDIT: typeof BEFORE_CELL_EDIT;
        AFTER_CELL_EDIT: typeof AFTER_CELL_EDIT;
        AFTER_CELL_EDIT_ASYNC: typeof AFTER_CELL_EDIT_ASYNC;
    }>;
    dispose(): void;
    refreshEditCellState(): void;
    setEditCell(param: ICurrentEditCellParam): void;
    getEditCellState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
    getLatestEditCellState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
    changeVisible(param: IEditorBridgeServiceVisibleParam): void;
    changeEditorDirty(dirtyStatus: boolean): void;
    getEditorDirty(): boolean;
    isVisible(): IEditorBridgeServiceVisibleParam;
    enableForceKeepVisible(): void;
    disableForceKeepVisible(): void;
    isForceKeepVisible(): boolean;
    getCurrentEditorId(): Nullable<string>;
}
export declare class EditorBridgeService extends Disposable implements IEditorBridgeService, IDisposable {
    private readonly _renderManagerService;
    private readonly _themeService;
    private readonly _univerInstanceService;
    private readonly _editorService;
    private readonly _refSelectionsService;
    private readonly _contextService;
    private _editorUnitId;
    private _isForceKeepVisible;
    private _editorIsDirty;
    private _visible;
    private _currentEditCell;
    private _currentEditCellState;
    private readonly _currentEditCellState$;
    readonly currentEditCellState$: Observable<Nullable<IEditorBridgeServiceParam>>;
    private readonly _visible$;
    readonly visible$: Observable<IEditorBridgeServiceVisibleParam>;
    private readonly _afterVisible$;
    readonly afterVisible$: Observable<IEditorBridgeServiceVisibleParam>;
    readonly interceptor: InterceptorManager<{
        BEFORE_CELL_EDIT: import('@univerjs/core').IInterceptor<ICellDataForSheetInterceptor, ISheetLocation>;
        AFTER_CELL_EDIT: import('@univerjs/core').IInterceptor<ICellDataForSheetInterceptor, ISheetLocation>;
        AFTER_CELL_EDIT_ASYNC: import('@univerjs/core').IInterceptor<Promise<Nullable<ICellDataForSheetInterceptor>>, ISheetLocation>;
    }>;
    constructor(_renderManagerService: IRenderManagerService, _themeService: ThemeService, _univerInstanceService: IUniverInstanceService, _editorService: IEditorService, _refSelectionsService: SheetsSelectionsService, _contextService: IContextService);
    refreshEditCellState(): void;
    setEditCell(param: ICurrentEditCellParam): void;
    private _clearCurrentEditCellState;
    getEditCellState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
    getLatestEditCellState(): {
        position: {
            startX: number;
            startY: number;
            endX: number;
            endY: number;
        };
        scaleX: number;
        scaleY: number;
        canvasOffset: {
            left: number;
            top: number;
        };
        row: number;
        column: number;
        unitId: string;
        sheetId: string;
        documentLayoutObject: IDocumentLayoutObject;
        editorUnitId: string;
        isInArrayFormulaRange: Nullable<boolean>;
    } | undefined;
    getCurrentEditorId(): string;
    changeVisible(param: IEditorBridgeServiceVisibleParam): void;
    isVisible(): IEditorBridgeServiceVisibleParam;
    enableForceKeepVisible(): void;
    disableForceKeepVisible(): void;
    isForceKeepVisible(): boolean;
    changeEditorDirty(dirtyStatus: boolean): void;
    getEditorDirty(): boolean;
}
export declare const IEditorBridgeService: import('@univerjs/core').IdentifierDecorator<EditorBridgeService>;
export {};
