import type DataGrid from "./DataGrid";
/**
 * EdgeScroller — manages continuous auto-scrolling when dragging near viewport edges.
 *
 * Usage:
 *   1. Call `start(onScroll)` when a drag operation begins
 *   2. Call `update(mouseX, mouseY)` on every mousemove during drag
 *   3. Call `stop()` when the drag operation ends
 *
 * The scroller uses requestAnimationFrame for smooth, continuous scrolling.
 * Speed increases as the mouse gets closer to the edge.
 */
/** Axis constraint for edge scrolling */
type ScrollAxis = 'both' | 'horizontal' | 'vertical';
declare class EdgeScroller {
    private grid;
    private animationId;
    private dirX;
    private dirY;
    private speedX;
    private speedY;
    private isActive;
    private onScrollCallback;
    private _lastMouseX;
    private _lastMouseY;
    private scrollAxis;
    /** Last known mouse X position during drag (read-only) */
    get lastMouseX(): number;
    /** Last known mouse Y position during drag (read-only) */
    get lastMouseY(): number;
    constructor(grid: DataGrid);
    /**
     * Start edge scrolling for a drag operation.
     * @param onScroll Callback invoked after each scroll tick (e.g., to update drag indicators)
     * @param initialX Optional initial mouse X (avoids stale lastMouseX before first update)
     * @param initialY Optional initial mouse Y (avoids stale lastMouseY before first update)
     * @param axis Scroll axis constraint: 'horizontal' for col drag, 'vertical' for row drag, 'both' for selection
     */
    start(onScroll?: () => void, initialX?: number, initialY?: number, axis?: ScrollAxis): void;
    /**
     * Update mouse position. Call on every mousemove during drag.
     * Detects edge proximity and starts/stops/adjusts the scroll animation.
     */
    update(mouseX: number, mouseY: number): void;
    /**
     * Stop edge scrolling. Call when the drag operation ends.
     */
    stop(): void;
    /**
     * Destroy the edge scroller, releasing all references.
     * Call when the parent DataGrid is destroyed.
     */
    destroy(): void;
    /**
     * Compute the scrollable viewport bounds, accounting for fixed columns, header, and scrollbars.
     */
    private getViewport;
    /**
     * Detect if the mouse is in an edge zone and compute scroll direction + speed.
     */
    private detectEdge;
    /**
     * Start the RAF animation loop (idempotent — won't start if already running).
     */
    private startAnimation;
    /**
     * Stop the RAF animation loop.
     */
    private stopAnimation;
    /**
     * Apply one frame of scrolling, clamped to valid bounds.
     */
    private applyScroll;
}
export default EdgeScroller;
