import { PluginManifest, BaseGridPlugin, CellClickEvent, CellMouseEvent } from '../../core/plugin/base-plugin';
import { CellRange, SelectionConfig, SelectionResult } from './types';
/**
 * Selection Plugin for tbw-grid
 *
 * Adds cell, row, and range selection capabilities to the grid with full keyboard support.
 * Whether you need simple cell highlighting or complex multi-range selections, this plugin has you covered.
 *
 * ## Installation
 *
 * ```ts
 * import { SelectionPlugin } from '@toolbox-web/grid/plugins/selection';
 * ```
 *
 * ## Selection Modes
 *
 * Configure the plugin with one of three modes via {@link SelectionConfig}:
 *
 * - **`'cell'`** - Single cell selection (default). Click cells to select individually.
 * - **`'row'`** - Full row selection. Click anywhere in a row to select the entire row.
 * - **`'range'`** - Rectangular selection. Click and drag or Shift+Click to select ranges.
 *
 * ## Keyboard Shortcuts
 *
 * | Shortcut | Action |
 * |----------|--------|
 * | `Arrow Keys` | Move selection |
 * | `Shift + Arrow` | Extend selection (range mode) |
 * | `Ctrl/Cmd + Click` | Toggle selection (multi-select) |
 * | `Shift + Click` | Extend to clicked cell/row |
 * | `Ctrl/Cmd + A` | Select all (range mode) |
 * | `Escape` | Clear selection |
 *
 * ## CSS Custom Properties
 *
 * | Property | Description |
 * |----------|-------------|
 * | `--tbw-focus-background` | Focused row background |
 * | `--tbw-range-selection-bg` | Range selection fill |
 * | `--tbw-range-border-color` | Range selection border |
 *
 * @example Basic row selection
 * ```ts
 * grid.gridConfig = {
 *   columns: [...],
 *   plugins: [new SelectionPlugin({ mode: 'row' })],
 * };
 * ```
 *
 * @example Range selection with event handling
 * ```ts
 * grid.gridConfig = {
 *   plugins: [new SelectionPlugin({ mode: 'range' })],
 * };
 *
 * grid.addEventListener('selection-change', (e) => {
 *   const { mode, ranges } = e.detail;
 *   console.log(`Selected ${ranges.length} ranges in ${mode} mode`);
 * });
 * ```
 *
 * @example Programmatic selection control
 * ```ts
 * const plugin = grid.getPlugin(SelectionPlugin);
 *
 * // Get current selection
 * const selection = plugin.getSelection();
 * console.log(selection.ranges);
 *
 * // Set selection programmatically
 * plugin.setRanges([{ from: { row: 0, col: 0 }, to: { row: 5, col: 3 } }]);
 *
 * // Clear all selection
 * plugin.clearSelection();
 * ```
 *
 * @see {@link SelectionMode} for detailed mode descriptions
 * @see {@link SelectionConfig} for configuration options
 * @see {@link SelectionResult} for the selection result structure
 * @see [Live Demos](?path=/docs/grid-plugins-selection--docs) for interactive examples
 */
export declare class SelectionPlugin extends BaseGridPlugin<SelectionConfig> {
    #private;
    /**
     * Plugin manifest - declares configuration validation rules.
     * @internal
     */
    static readonly manifest: PluginManifest<SelectionConfig>;
    /** @internal */
    readonly name = "selection";
    /** @internal */
    readonly styles: string;
    /** @internal */
    protected get defaultConfig(): Partial<SelectionConfig>;
    /** Row selection state (row mode) */
    private selected;
    private lastSelected;
    private anchor;
    /** Range selection state (range mode) */
    private ranges;
    private activeRange;
    private cellAnchor;
    private isDragging;
    /** Pending keyboard navigation update (processed in afterRender) */
    private pendingKeyboardUpdate;
    /** Cell selection state (cell mode) */
    private selectedCell;
    /**
     * Check if selection is enabled at the grid level.
     * Grid-wide `selectable: false` or plugin's `enabled: false` disables all selection.
     */
    private isSelectionEnabled;
    /**
     * Check if a row/cell is selectable.
     * Returns true if selectable, false if not.
     */
    private checkSelectable;
    /**
     * Check if an entire row is selectable (for row mode).
     */
    private isRowSelectable;
    /**
     * Check if a cell is selectable (for cell/range modes).
     */
    private isCellSelectable;
    /** @internal */
    detach(): void;
    /** @internal */
    onCellClick(event: CellClickEvent): boolean;
    /** @internal */
    onKeyDown(event: KeyboardEvent): boolean;
    /** @internal */
    onCellMouseDown(event: CellMouseEvent): boolean | void;
    /** @internal */
    onCellMouseMove(event: CellMouseEvent): boolean | void;
    /** @internal */
    onCellMouseUp(_event: CellMouseEvent): boolean | void;
    /** @internal */
    afterRender(): void;
    /**
     * Called after scroll-triggered row rendering.
     * Reapplies selection classes to recycled DOM elements.
     * @internal
     */
    onScrollRender(): void;
    /**
     * Get the current selection as a unified result.
     * Works for all selection modes and always returns ranges.
     *
     * @example
     * ```ts
     * const selection = plugin.getSelection();
     * if (selection.ranges.length > 0) {
     *   const { from, to } = selection.ranges[0];
     *   // For cell mode: from === to (single cell)
     *   // For row mode: from.col = 0, to.col = lastCol (full row)
     *   // For range mode: rectangular selection
     * }
     * ```
     */
    getSelection(): SelectionResult;
    /**
     * Get all selected cells across all ranges.
     */
    getSelectedCells(): Array<{
        row: number;
        col: number;
    }>;
    /**
     * Check if a specific cell is in range selection.
     */
    isCellSelected(row: number, col: number): boolean;
    /**
     * Clear all selection.
     */
    clearSelection(): void;
    /**
     * Set selected ranges programmatically.
     */
    setRanges(ranges: CellRange[]): void;
}
//# sourceMappingURL=SelectionPlugin.d.ts.map