import { BaseGridPlugin } from '../../core/plugin/base-plugin';
import { ColumnConfig, ToolPanelDefinition } from '../../core/types';
import { PivotDataRow } from './pivot-engine';
import { PivotConfig, PivotResult, PivotValueField } from './types';
/**
 * Pivot Plugin for tbw-grid
 *
 * @example
 * ```ts
 * new PivotPlugin({
 *   rowGroupFields: ['category'],
 *   columnGroupFields: ['region'],
 *   valueFields: [{ field: 'sales', aggFunc: 'sum' }]
 * })
 * ```
 */
export declare class PivotPlugin extends BaseGridPlugin<PivotConfig> {
    readonly name = "pivot";
    readonly styles: string;
    /** Tool panel ID for shell integration */
    static readonly PANEL_ID = "pivot";
    protected get defaultConfig(): Partial<PivotConfig>;
    private isActive;
    private hasInitialized;
    private pivotResult;
    private fieldHeaderMap;
    private expandedKeys;
    private defaultExpanded;
    private originalColumns;
    private panelContainer;
    private grandTotalFooter;
    private previousVisibleKeys;
    private keysToAnimate;
    /**
     * Check if the plugin has valid pivot configuration (at least value fields).
     */
    private hasValidPivotConfig;
    /**
     * Get expand/collapse animation style from plugin config.
     * Uses base class isAnimationEnabled to respect grid-level settings.
     */
    private get animationStyle();
    detach(): void;
    getToolPanel(): ToolPanelDefinition | undefined;
    processRows(rows: readonly unknown[]): PivotDataRow[];
    processColumns(columns: readonly ColumnConfig[]): ColumnConfig[];
    renderRow(row: Record<string, unknown>, rowEl: HTMLElement, rowIndex: number): boolean;
    /**
     * Remove pivot-specific classes, attributes, and inline styles from a row element.
     * Called when pivot mode is disabled to clean up reused DOM elements.
     * Clears innerHTML so the grid's default renderer can rebuild the row.
     */
    private cleanupPivotStyling;
    onKeyDown(event: KeyboardEvent): boolean | void;
    afterRender(): void;
    /**
     * Render the grand total row as a sticky footer pinned to the bottom.
     */
    private renderGrandTotalFooter;
    /**
     * Remove the grand total footer element.
     */
    private cleanupGrandTotalFooter;
    toggle(key: string): void;
    expand(key: string): void;
    collapse(key: string): void;
    expandAll(): void;
    collapseAll(): void;
    /**
     * Add all group keys from the current pivot result to expandedKeys.
     */
    private expandAllKeys;
    isExpanded(key: string): boolean;
    enablePivot(): void;
    disablePivot(): void;
    isPivotActive(): boolean;
    getPivotResult(): PivotResult | null;
    setRowGroupFields(fields: string[]): void;
    setColumnGroupFields(fields: string[]): void;
    setValueFields(fields: PivotValueField[]): void;
    refresh(): void;
    /**
     * Show the pivot tool panel.
     * Opens the tool panel and ensures this section is expanded.
     */
    showPanel(): void;
    /**
     * Hide the tool panel.
     */
    hidePanel(): void;
    /**
     * Toggle the pivot tool panel section.
     */
    togglePanel(): void;
    /**
     * Check if the pivot panel section is currently expanded.
     */
    isPanelVisible(): boolean;
    private get gridColumns();
    /**
     * Refresh pivot and update tool panel if active.
     */
    private refreshIfActive;
    private buildFieldHeaderMap;
    private getAvailableFields;
    private captureOriginalColumns;
    private renderPanel;
    private refreshPanel;
    private addFieldToZone;
    private removeFieldFromZone;
    private removeFromOtherZones;
    private addValueField;
    private removeValueField;
    private updateValueAggFunc;
}
//# sourceMappingURL=PivotPlugin.d.ts.map