import { BaseGridPlugin, GridElement, PluginManifest } from '../../core/plugin/base-plugin';
import { BreakpointConfig, ResponsivePluginConfig } from './types';
/**
 * Responsive Plugin for tbw-grid
 *
 * Adds automatic card layout mode when the grid width falls below a configurable
 * breakpoint. Perfect for responsive designs, split-pane UIs, and mobile viewports.
 *
 * @template T The row data type
 *
 * @example
 * ```ts
 * // Basic usage - switch to card layout below 500px
 * const config: GridConfig = {
 *   plugins: [new ResponsivePlugin({ breakpoint: 500 })],
 * };
 * ```
 *
 * @example
 * ```ts
 * // Hide less important columns in card mode
 * const config: GridConfig = {
 *   plugins: [
 *     new ResponsivePlugin({
 *       breakpoint: 600,
 *       hiddenColumns: ['createdAt', 'updatedAt'],
 *     }),
 *   ],
 * };
 * ```
 *
 * @example
 * ```ts
 * // Custom card renderer for advanced layouts
 * const config: GridConfig = {
 *   plugins: [
 *     new ResponsivePlugin({
 *       breakpoint: 400,
 *       cardRenderer: (row) => {
 *         const card = document.createElement('div');
 *         card.className = 'custom-card';
 *         card.innerHTML = `<strong>${row.name}</strong><br>${row.email}`;
 *         return card;
 *       },
 *     }),
 *   ],
 * };
 * ```
 */
export declare class ResponsivePlugin<T = unknown> extends BaseGridPlugin<ResponsivePluginConfig<T>> {
    #private;
    readonly name = "responsive";
    readonly version = "1.0.0";
    readonly styles: string;
    /**
     * Plugin manifest declaring incompatibilities with other plugins.
     */
    static readonly manifest: PluginManifest;
    /**
     * Check if currently in responsive mode.
     * @returns `true` if the grid is in card layout mode
     */
    isResponsive(): boolean;
    /**
     * Force responsive mode regardless of width.
     * Useful for testing or manual control.
     * @param enabled - Whether to enable responsive mode
     */
    setResponsive(enabled: boolean): void;
    /**
     * Update breakpoint dynamically.
     * @param width - New breakpoint width in pixels
     */
    setBreakpoint(width: number): void;
    /**
     * Set a custom card renderer.
     * This allows framework adapters to provide template-based renderers at runtime.
     * @param renderer - The card renderer function, or undefined to use default
     */
    setCardRenderer(renderer: ResponsivePluginConfig<T>['cardRenderer']): void;
    /**
     * Get current grid width.
     * @returns Width of the grid element in pixels
     */
    getWidth(): number;
    /**
     * Get the currently active breakpoint config (multi-breakpoint mode only).
     * @returns The active BreakpointConfig, or null if no breakpoint is active
     */
    getActiveBreakpoint(): BreakpointConfig | null;
    attach(grid: GridElement): void;
    detach(): void;
    /**
     * Apply hidden and value-only columns.
     * In legacy mode (single breakpoint), only applies when in responsive mode.
     * In multi-breakpoint mode, applies whenever there's an active breakpoint.
     */
    afterRender(): void;
    /**
     * Custom row rendering when cardRenderer is provided and in responsive mode.
     *
     * When a cardRenderer is configured, this hook takes over row rendering to display
     * the custom card layout instead of the default cell structure.
     *
     * @param row - The row data object
     * @param rowEl - The row DOM element to render into
     * @param rowIndex - The index of the row in the data array
     * @returns `true` if rendered (prevents default), `void` for default rendering
     */
    renderRow(row: unknown, rowEl: HTMLElement, rowIndex: number): boolean | void;
    /**
     * Handle keyboard navigation in responsive mode.
     *
     * In responsive mode, the visual layout is inverted:
     * - Cells are stacked vertically within each "card" (row)
     * - DOWN/UP visually moves within the card (between fields)
     * - Page Down/Page Up or Ctrl+Down/Up moves between cards
     *
     * For custom cardRenderers, keyboard navigation is disabled entirely
     * since the implementor controls the card content and should handle
     * navigation via their own event handlers.
     *
     * @returns `true` if the event was handled and default behavior should be prevented
     */
    onKeyDown(e: KeyboardEvent): boolean;
    /**
     * Return total extra height contributed by mixed row heights.
     * This is called by the grid's virtualization system to adjust scrollbar height.
     *
     * The grid calculates: totalRows * baseRowHeight + pluginExtraHeight
     *
     * For mixed layouts (groups + cards), we need to report the difference between
     * actual heights and what the base calculation assumes:
     * - Extra for groups: groupCount * (groupHeight - baseHeight)
     * - Extra for cards: cardCount * (cardHeight - baseHeight)
     */
    getExtraHeight(): number;
    /**
     * Return extra height that appears before a given row index.
     * Used by virtualization to correctly calculate scroll positions.
     *
     * Like getExtraHeight, this accounts for both group and card row heights.
     */
    getExtraHeightBefore(beforeRowIndex: number): number;
}
//# sourceMappingURL=ResponsivePlugin.d.ts.map