import { type PointerEventState } from '@blockeditor/block-std';
import type { BlockElement } from '@blockeditor/lit';
import { WidgetElement } from '@blockeditor/lit';
import { type TopLevelBlockModel } from '../../../_common/utils/index.js';
import { DocPageBlockComponent } from '../../../page-block/doc/doc-page-block.js';
import { EdgelessPageBlockComponent } from '../../../page-block/edgeless/edgeless-page-block.js';
import type { IVec } from '../../../surface-block/index.js';
import { DragPreview } from './components/drag-preview.js';
import { DropIndicator } from './components/drop-indicator.js';
import type { DragHandleOption, DropType } from './config.js';
import { DragHandleOptionsRunner } from './config.js';
export declare const AFFINE_DRAG_HANDLE_WIDGET = "affine-drag-handle-widget";
export declare class AffineDragHandleWidget extends WidgetElement<EdgelessPageBlockComponent | DocPageBlockComponent> {
    static styles: import("lit").CSSResult;
    static staticOptionRunner: DragHandleOptionsRunner;
    static registerOption(option: DragHandleOption): import("@blockeditor/global/utils").Disposable;
    private _dragHandleContainer;
    private _dragHandleGrabber;
    draggingElements: BlockElement[];
    dropBlockId: string;
    dropType: DropType | null;
    dragging: boolean;
    dragPreview: DragPreview | null;
    dropIndicator: DropIndicator | null;
    lastDragPointerState: PointerEventState | null;
    scale: number;
    center: IVec;
    rafID: number;
    private _dragHoverRect;
    private _lastHoveredBlockPath;
    private _lastShowedBlock;
    private _isHoverDragHandleVisible;
    private _isDragHandleHovered;
    private _isTopLevelDragHandleVisible;
    private _anchorBlockId;
    private _anchorBlockPath;
    private _anchorModelDisposables;
    get optionRunner(): DragHandleOptionsRunner;
    get pageBlockElement(): DocPageBlockComponent | EdgelessPageBlockComponent;
    get selectedBlocks(): import("@blockeditor/block-std").BlockSelection[];
    get anchorBlockElement(): BlockElement | null;
    get anchorEdgelessElement(): TopLevelBlockModel | null;
    private _clearRaf;
    /**
     * When dragging, should update indicator position and target drop block id
     */
    private _getDropResult;
    private _updateDropResult;
    private _resetDropResult;
    private _createDropIndicator;
    private _updateDropIndicator;
    private _updateDropIndicatorOnScroll;
    private _removeDropIndicator;
    private _calculatePreviewOffset;
    private _createDragPreview;
    private _updateDragPreviewPosition;
    private _updateDragPreviewOnViewportUpdate;
    private _removeDragPreview;
    private _changeCursorToGrabbing;
    private _resetCursor;
    private _startDragging;
    private _hide;
    private _reset;
    private _handleAnchorModelDisposables;
    private _getBlockElementFromViewStore;
    private get _viewportOffset();
    private _getTopWithBlockElement;
    /** Check if given blockElement is selected */
    private _isBlockSelected;
    private _showDragHandleOnHoverBlock;
    private _showDragHandleOnTopLevelBlocks;
    private _getHoveredBlocks;
    private _getDraggingAreaRect;
    private _getHoverAreaRectTopLevelBlock;
    private _updateDragHoverRectTopLevelBlock;
    private _setSelectedBlocks;
    private get _rangeManager();
    private _canEditing;
    private _checkTopLevelBlockSelection;
    /**
     * When pointer move on block, should show drag handle
     * And update hover block id and path
     */
    private _pointerMoveOnBlock;
    private _pointerMoveHandler;
    private _throttledPointerMoveHandler;
    /**
     * When click on drag handle
     * Should select the block and show slash menu if current block is not selected
     * Should clear selection if current block is the first selected block
     */
    private _clickHandler;
    private _onDragStart;
    private _onDragMove;
    private _onDragEnd;
    /**
     * When start dragging, should set dragging elements and create drag preview
     */
    private _dragStartHandler;
    /**
     * When dragging, should:
     * Update drag preview position
     * Update indicator position
     * Update drop block id
     */
    private _dragMoveHandler;
    /**
     * When drag end, should move blocks to drop position
     * @returns
     */
    private _dragEndHandler;
    private _pointerOutHandler;
    private _onDragHandlePointerEnter;
    private _onDragHandlePointerDown;
    private _onDragHandlePointerUp;
    private _onDragHandlePointerLeave;
    private _handleEdgelessToolUpdated;
    private _handleEdgelessViewPortUpdated;
    firstUpdated(): void;
    connectedCallback(): void;
    disconnectedCallback(): void;
    render(): import("lit").TemplateResult<1>;
}
declare global {
    interface HTMLElementTagNameMap {
        [AFFINE_DRAG_HANDLE_WIDGET]: AffineDragHandleWidget;
    }
}
//# sourceMappingURL=drag-handle.d.ts.map