import { BaseGridPlugin, CellClickEvent } from '../../core/plugin/base-plugin';
import { GroupingRowsConfig, RenderRow } from './types';
/**
 * Group state information returned by getGroupState()
 */
export interface GroupState {
    /** Whether grouping is currently active */
    isActive: boolean;
    /** Number of expanded groups */
    expandedCount: number;
    /** Total number of groups */
    totalGroups: number;
    /** Array of expanded group keys */
    expandedKeys: string[];
}
/**
 * Row Grouping Plugin for tbw-grid
 *
 * @example
 * ```ts
 * new GroupingRowsPlugin({
 *   enabled: true,
 *   groupOn: (row) => row.category,
 *   defaultExpanded: false,
 *   showRowCount: true,
 * })
 * ```
 */
export declare class GroupingRowsPlugin extends BaseGridPlugin<GroupingRowsConfig> {
    readonly name = "groupingRows";
    readonly styles: string;
    protected get defaultConfig(): Partial<GroupingRowsConfig>;
    private expandedKeys;
    private flattenedRows;
    private isActive;
    private previousVisibleKeys;
    private keysToAnimate;
    /**
     * Get expand/collapse animation style from plugin config.
     * Uses base class isAnimationEnabled to respect grid-level settings.
     */
    private get animationStyle();
    detach(): void;
    /**
     * Auto-detect grouping configuration from grid config.
     * Called by plugin system to determine if plugin should activate.
     */
    static detect(rows: readonly any[], config: any): boolean;
    processRows(rows: readonly any[]): any[];
    onCellClick(event: CellClickEvent): boolean | void;
    onKeyDown(event: KeyboardEvent): boolean | void;
    /**
     * Render a row. Returns true if we handled the row (group row), false otherwise.
     */
    renderRow(row: any, rowEl: HTMLElement, _rowIndex: number): boolean;
    afterRender(): void;
    /**
     * Create a toggle button for expanding/collapsing a group.
     */
    private createToggleButton;
    /**
     * Get the formatted label text for a group.
     */
    private getGroupLabelText;
    private renderFullWidthGroupRow;
    private renderPerColumnGroupRow;
    /**
     * Expand all groups.
     */
    expandAll(): void;
    /**
     * Collapse all groups.
     */
    collapseAll(): void;
    /**
     * Toggle expansion of a specific group.
     * @param key - The group key to toggle
     */
    toggle(key: string): void;
    /**
     * Check if a specific group is expanded.
     * @param key - The group key to check
     * @returns Whether the group is expanded
     */
    isExpanded(key: string): boolean;
    /**
     * Expand a specific group.
     * @param key - The group key to expand
     */
    expand(key: string): void;
    /**
     * Collapse a specific group.
     * @param key - The group key to collapse
     */
    collapse(key: string): void;
    /**
     * Get the current group state.
     * @returns Group state information
     */
    getGroupState(): GroupState;
    /**
     * Get the total count of visible rows (including group headers).
     * @returns Number of visible rows
     */
    getRowCount(): number;
    /**
     * Refresh the grouped row model.
     * Call this after modifying groupOn or other config options.
     */
    refreshGroups(): void;
    /**
     * Get current expanded group keys.
     * @returns Array of expanded group keys
     */
    getExpandedGroups(): string[];
    /**
     * Get the flattened row model.
     * @returns Array of render rows (groups + data rows)
     */
    getFlattenedRows(): RenderRow[];
    /**
     * Check if grouping is currently active.
     * @returns Whether grouping is active
     */
    isGroupingActive(): boolean;
    /**
     * Set the groupOn function dynamically.
     * @param fn - The groupOn function or undefined to disable
     */
    setGroupOn(fn: ((row: any) => any[] | any | null | false) | undefined): void;
}
//# sourceMappingURL=GroupingRowsPlugin.d.ts.map