import { IRangeWithCoord, ISelectionCellWithMergeInfo, Nullable, ThemeService, Disposable } from '@univerjs/core';
import { Scene, Group, Rect } from '@univerjs/engine-render';
import { ISelectionStyle, ISelectionWidgetConfig, ISelectionWithCoordAndStyle } from '@univerjs/sheets';
import { Subject } from 'rxjs';
import { SelectionRenderModel } from './selection-render-model';
export declare enum SELECTION_MANAGER_KEY {
    Selection = "__SpreadsheetSelectionShape__",
    top = "__SpreadsheetSelectionTopControl__",
    bottom = "__SpreadsheetSelectionBottomControl__",
    left = "__SpreadsheetSelectionShapeLeftControl__",
    right = "__SpreadsheetSelectionShapeRightControl__",
    backgroundTop = "__SpreadsheetSelectionBackgroundControlTop__",
    backgroundMiddleLeft = "__SpreadsheetSelectionBackgroundControlMiddleLeft__",
    backgroundMiddleRight = "__SpreadsheetSelectionBackgroundControlMiddleRight__",
    backgroundBottom = "__SpreadsheetSelectionBackgroundControlBottom__",
    fill = "__SpreadsheetSelectionFillControl__",
    fillTopLeft = "__SpreadsheetSelectionFillControlTopLeft__",
    fillBottomRight = "__SpreadsheetSelectionFillControlBottomRight__",
    fillTopLeftInner = "__SpreadsheetSelectionFillControlTopLeftInner__",
    fillBottomRightInner = "__SpreadsheetSelectionFillControlBottomRightInner__",
    lineMain = "__SpreadsheetDragLineMainControl__",
    lineContent = "__SpreadsheetDragLineContentControl__",
    line = "__SpreadsheetDragLineControl__",
    dash = "__SpreadsheetDragDashControl__",
    rowHeaderBackground = "__SpreadSheetSelectionRowHeaderBackground__",
    rowHeaderBorder = "__SpreadSheetSelectionRowHeaderBorder__",
    rowHeaderGroup = "__SpreadSheetSelectionRowHeaderGroup__",
    columnHeaderBackground = "__SpreadSheetSelectionColumnHeaderBackground__",
    columnHeaderBorder = "__SpreadSheetSelectionColumnHeaderBorder__",
    columnHeaderGroup = "__SpreadSheetSelectionColumnHeaderGroup__",
    topLeftWidget = "__SpreadSheetSelectionTopLeftWidget__",
    topCenterWidget = "__SpreadSheetSelectionTopCenterWidget__",
    topRightWidget = "__SpreadSheetSelectionTopRightWidget__",
    middleLeftWidget = "__SpreadSheetSelectionMiddleLeftWidget__",
    middleRightWidget = "__SpreadSheetSelectionMiddleRightWidget__",
    bottomLeftWidget = "__SpreadSheetSelectionBottomLeftWidget__",
    bottomCenterWidget = "__SpreadSheetSelectionBottomCenterWidget__",
    bottomRightWidget = "__SpreadSheetSelectionBottomRightWidget__"
}
/**
 * The main selection canvas component, includes leftControl,rightControl,topControl,bottomControl,backgroundControlTop,backgroundControlMiddleLeft,backgroundControlMiddleRight,backgroundControlBottom,fillControl
 */
export declare class SelectionControl extends Disposable {
    protected _scene: Scene;
    protected _zIndex: number;
    protected readonly _themeService: ThemeService;
    protected _highlightHeader: boolean;
    private _leftControl;
    private _rightControl;
    private _topControl;
    private _bottomControl;
    private _backgroundControlTop;
    private _backgroundControlBottom;
    private _backgroundControlMiddleLeft;
    private _backgroundControlMiddleRight;
    private _fillControl;
    private _selectionShapeGroup;
    private _rowHeaderBackground;
    private _rowHeaderBorder;
    private _rowHeaderGroup;
    private _columnHeaderBackground;
    private _columnHeaderBorder;
    private _columnHeaderGroup;
    private _topLeftWidget;
    private _topCenterWidget;
    private _topRightWidget;
    private _middleLeftWidget;
    private _middleRightWidget;
    private _bottomLeftWidget;
    private _bottomCenterWidget;
    private _bottomRightWidget;
    private _dashRect;
    protected _selectionModel: SelectionRenderModel;
    private _defaultStyle;
    private _currentStyle;
    protected _rowHeaderWidth: number;
    protected _columnHeaderHeight: number;
    protected _widgetRects: Rect[];
    private _dispose$;
    readonly dispose$: import('rxjs').Observable<SelectionControl>;
    /**
     * eventSource: selectionShapeExtension selectionMoving$.next,
     * Observer: prompt.controller
     */
    readonly selectionMoving$: Subject<IRangeWithCoord>;
    readonly selectionMoved$: Subject<IRangeWithCoord>;
    readonly selectionScaling$: Subject<IRangeWithCoord>;
    readonly selectionScaled$: Subject<Nullable<IRangeWithCoord>>;
    readonly selectionFilling$: Subject<Nullable<IRangeWithCoord>>;
    private readonly _selectionFilled$;
    readonly selectionFilled$: import('rxjs').Observable<Nullable<IRangeWithCoord>>;
    private _isHelperSelection;
    constructor(_scene: Scene, _zIndex: number, _themeService: ThemeService, _highlightHeader?: boolean, options?: {
        rowHeaderWidth: number;
        columnHeaderHeight: number;
    });
    get zIndex(): number;
    get leftControl(): Rect;
    get rightControl(): Rect;
    get topControl(): Rect;
    get bottomControl(): Rect;
    get fillControl(): Rect;
    get backgroundControlTop(): Rect;
    get backgroundControlBottom(): Rect;
    get backgroundControlMiddleLeft(): Rect;
    get backgroundControlMiddleRight(): Rect;
    get selectionShape(): Group;
    get columnHeaderGroup(): Group;
    get rowHeaderGroup(): Group;
    get selectionShapeGroup(): Group;
    get model(): SelectionRenderModel;
    get topLeftWidget(): Rect;
    get topCenterWidget(): Rect;
    get topRightWidget(): Rect;
    get middleLeftWidget(): Rect;
    get middleRightWidget(): Rect;
    get bottomLeftWidget(): Rect;
    get bottomCenterWidget(): Rect;
    get bottomRightWidget(): Rect;
    get themeService(): ThemeService;
    get selectionModel(): SelectionRenderModel;
    set selectionModel(model: SelectionRenderModel);
    get defaultStyle(): ISelectionStyle;
    set defaultStyle(style: ISelectionStyle);
    get dashRect(): Rect;
    get currentStyle(): Nullable<ISelectionStyle>;
    set currentStyle(style: Nullable<ISelectionStyle>);
    get isHelperSelection(): boolean;
    get rowHeaderWidth(): number;
    set rowHeaderWidth(width: number);
    get columnHeaderHeight(): number;
    set columnHeaderHeight(height: number);
    setEvent(state: boolean): void;
    refreshSelectionFilled(val: IRangeWithCoord): void;
    /**
     * Update Control Style And Position of SelectionControl
     * @param selectionStyle
     */
    protected _setSizeAndStyleForSelectionControl(selectionStyle: ISelectionStyle): void;
    /**
     * update selection control position by curr selection model
     */
    protected _refreshControlPosition(): void;
    updateStyle(style: ISelectionStyle): void;
    updateRange(range: IRangeWithCoord, primaryCell: Nullable<ISelectionCellWithMergeInfo>): void;
    /**
     * Update selection model with new range & primary cell(aka: highlight/current), also update row/col selection size & style.
     *
     * @param newSelectionRange
     * @param rowHeaderWidth
     * @param columnHeaderHeight
     * @param style
     * @param primaryCell primary cell
     */
    update(newSelectionRange: IRangeWithCoord, rowHeaderWidth?: number, columnHeaderHeight?: number, style?: Nullable<ISelectionStyle>, primaryCell?: Nullable<ISelectionCellWithMergeInfo>): void;
    /**
     * update primary range
     * @param primaryCell model.current (aka: highlight)
     */
    updateCurrCell(primaryCell?: Nullable<ISelectionCellWithMergeInfo>): void;
    clearHighlight(): void;
    getScene(): Scene;
    dispose(): void;
    /**
     * Get the cell information of the current selection, considering the case of merging cells
     */
    getCurrentCellInfo(): Nullable<IRangeWithCoord>;
    getValue(): ISelectionWithCoordAndStyle;
    getRange(): IRangeWithCoord;
    enableHelperSelection(): void;
    disableHelperSelection(): void;
    private _initialize;
    private _initialHeader;
    private _initialWidget;
    private _updateHeaderBackground;
    private _updateBackgroundControl;
    private _updateWidgets;
    protected _hasWidgets(widgets: ISelectionWidgetConfig): boolean;
    private _getScale;
    private _antLineOffset;
    private _antRequestNewFrame;
    private _stopAntLineAnimation;
    private _startAntLineAnimation;
}
