import { BaseGridPlugin, CellClickEvent, HeaderClickEvent } from '../../core/plugin/base-plugin';
import { ColumnConfig } from '../../core/types';
import { FlattenedTreeRow, TreeConfig, TreeRow } from './types';
/**
 * Tree Data Plugin for tbw-grid
 *
 * @example
 * ```ts
 * new TreePlugin({ defaultExpanded: true, indentWidth: 24 })
 * ```
 */
export declare class TreePlugin extends BaseGridPlugin<TreeConfig> {
    readonly name = "tree";
    readonly styles: string;
    protected get defaultConfig(): Partial<TreeConfig>;
    private expandedKeys;
    private initialExpansionDone;
    private flattenedRows;
    private rowKeyMap;
    private previousVisibleKeys;
    private keysToAnimate;
    private sortState;
    detach(): void;
    /**
     * Get expand/collapse animation style from plugin config.
     * Uses base class isAnimationEnabled to respect grid-level settings.
     */
    private get animationStyle();
    detect(rows: readonly unknown[]): boolean;
    processRows(rows: readonly unknown[]): TreeRow[];
    /** Assign stable keys to rows (preserves key across sort operations) */
    private withStableKeys;
    /** Flatten tree using stable keys */
    private flattenTree;
    /** Sort tree recursively, keeping children with parents */
    private sortTree;
    processColumns(columns: readonly ColumnConfig[]): ColumnConfig[];
    onCellClick(event: CellClickEvent): boolean;
    onKeyDown(event: KeyboardEvent): boolean | void;
    onHeaderClick(event: HeaderClickEvent): boolean;
    afterRender(): void;
    expand(key: string): void;
    collapse(key: string): void;
    toggle(key: string): void;
    expandAll(): void;
    collapseAll(): void;
    isExpanded(key: string): boolean;
    getExpandedKeys(): string[];
    getFlattenedRows(): FlattenedTreeRow[];
    getRowByKey(key: string): TreeRow | undefined;
    expandToKey(key: string): void;
}
//# sourceMappingURL=TreePlugin.d.ts.map