import type { ReactiveController, ReactiveControllerHost } from 'lit';
/** The active-cell coordinate. `row` is the logical row index; `-1` is the header row. `col` is the column id. */
export interface ActiveCell {
    /** The logical row index into the row model, or `-1` for the header row. */
    row: number;
    /** The column id, including synthetic control ids (`__select__` / `__expand__`). */
    col: string;
}
/**
 * The adapter the navigation controller talks to. Keeping this narrow (rather than reaching into the whole component)
 * keeps the controller testable and decoupled from the render internals. The component supplies one of these.
 */
export interface NavigationHost {
    /** The element's shadow root (for focus queries). */
    readonly shadowRoot: ShadowRoot | null;
    /** Resolves after the host's next render completes. */
    readonly updateComplete: Promise<boolean>;
    /** The full list of focusable column ids in render order (control ids first, then data columns). */
    focusableColumnIds(): string[];
    /** The number of logical rows in the current row model (post sort/filter/page). */
    rowCount(): number;
    /** The current active cell, or `null` before the first focus. */
    getActiveCell(): ActiveCell | null;
    /** Sets the active cell coordinate (drives roving tabindex + the deferred focus). */
    setActiveCell(cell: ActiveCell | null): void;
    /** The scroller element that owns vertical scroll. */
    scrollerEl(): HTMLElement | null;
    /** The measured height of a single row, in pixels. */
    rowHeight(): number;
    /** Scrolls the given logical row index into view (delegates to the virtualizer). */
    scrollRowIntoView(index: number): void;
    /** Whether the grid is laid out right-to-left. */
    isRtl(): boolean;
    /** Sorts the given column (Enter on a header). */
    sortColumn(columnId: string, multi: boolean): void;
    /** Toggles selection of the given logical row (Space). */
    toggleRowSelection(rowIndex: number): void;
    /** Snapshots the current selection as the base a new Shift+Arrow range builds on (and shrinks back to). */
    beginRangeSelection(): void;
    /** Extends the contiguous selection to the given logical row (Shift+Arrow). */
    extendSelectionTo(anchor: number, rowIndex: number): void;
    /** Selects all rows (Ctrl/Cmd+A). */
    selectAllRows(): void;
    /** Whether the grid allows selection. */
    selectionEnabled(): boolean;
    /** Whether the grid allows multiple selection (for Ctrl+A and Shift+Arrow). */
    multiSelectEnabled(): boolean;
    /** Reorders the active header column by `delta` positions (Shift+Arrow on a header). */
    moveColumnByStep(columnId: string, delta: number): void;
    /** Resizes the active header column by `delta` steps (Alt+Arrow on a header). */
    resizeColumnByStep(columnId: string, delta: number): void;
    /** Whether the given column can be reordered. */
    columnMovable(columnId: string): boolean;
    /** Whether the given column can be resized. */
    columnResizable(columnId: string): boolean;
    /**
     * Toggles the given row's expansion when the coordinate supports it (Enter on the expand cell). Returns `true` when
     * the key was handled.
     */
    toggleRowExpansion(rowIndex: number, columnId: string): boolean;
    /** Emits the cell-click event for the given coordinate (Enter on a data cell — keyboard parity with clicks). */
    activateCell(rowIndex: number, columnId: string): void;
    /** Horizontally scrolls the given cell element into the visible band between sticky pinned columns. */
    revealColumn(el: HTMLElement): void;
    /** Copies the current selection to the clipboard (Ctrl/Cmd+C). Returns `true` when there was anything to copy. */
    copySelection(): boolean;
    /** Emits the cell context-menu event for the given coordinate (Shift+F10 / the menu key). */
    openContextMenu(rowIndex: number, columnId: string, originalEvent: KeyboardEvent): void;
    /** Writes a short message to the aria-live region. */
    announce(message: string): void;
}
/**
 * Owns the W3C APG "grid" keyboard contract for `<wa-data-grid>`: key handling, roving tabindex, and focus restoration.
 *
 * The active cell is a `{ row, col }` coordinate, not a DOM reference, because virtualization recycles row elements;
 * focus is re-applied after the next render by querying the stamped `data-row-index` / `data-col-id`.
 */
export declare class GridNavigationController implements ReactiveController {
    private host;
    /** The row index a Shift+Arrow range selection started from. */
    private selectionAnchor;
    private focusAttempts;
    constructor(element: ReactiveControllerHost, host: NavigationHost);
    hostConnected(): void;
    /** The single keydown switch, bound to the scroller in the template. */
    handleKeyDown: (event: KeyboardEvent) => void;
    private handleRangeExtend;
    /** Rows to jump per Page Up/Down: roughly one viewport, minus one for context. */
    private pageStep;
    /** Moves the active cell to a new coordinate, scrolling it into view and deferring focus past the next render. */
    moveActiveCell(next: ActiveCell): void;
    /** Focuses the element matching the active-cell coordinate; retries once if virtualization hasn't produced it. */
    focusActiveCellEl(): void;
    /** Clears the Shift+Arrow range anchor (positional — meaningless once the visible row order changes). */
    resetRangeAnchor(): void;
    /** Clamps the active row into the current range after the row set changes (sort/filter/page). */
    clampActiveRow(): void;
}
