import { ColumnConfig } from '../types';
import { BaseGridPlugin, CellClickEvent, CellEditor, CellMouseEvent, CellRenderer, GridElement, HeaderClickEvent, HeaderRenderer, PluginQuery, RowClickEvent, ScrollEvent } from './base-plugin';
/**
 * Manages plugins for a single grid instance.
 *
 * Plugins are executed in array order. This is intentional and documented behavior.
 * Place plugins in the order you want their hooks to execute.
 */
export declare class PluginManager {
    private grid;
    /** Plugin instances in order of attachment */
    private plugins;
    /** Get all registered plugins (read-only) */
    getPlugins(): readonly BaseGridPlugin[];
    /** Map from plugin class to instance for fast lookup */
    private pluginMap;
    /** Cell renderers registered by plugins */
    private cellRenderers;
    /** Header renderers registered by plugins */
    private headerRenderers;
    /** Cell editors registered by plugins */
    private cellEditors;
    constructor(grid: GridElement);
    /**
     * Attach all plugins from the config.
     */
    attachAll(plugins: BaseGridPlugin[]): void;
    /**
     * Attach a plugin to this grid.
     * Validates dependencies and notifies other plugins of the new attachment.
     */
    attach(plugin: BaseGridPlugin): void;
    /**
     * Detach all plugins and clean up.
     * Notifies plugins of detachment via onPluginDetached hook.
     */
    detachAll(): void;
    /**
     * Get a plugin instance by its class.
     */
    getPlugin<T extends BaseGridPlugin>(PluginClass: new (...args: any[]) => T): T | undefined;
    /**
     * Get a plugin instance by its name.
     */
    getPluginByName(name: string): BaseGridPlugin | undefined;
    /**
     * Check if a plugin is attached.
     */
    hasPlugin<T extends BaseGridPlugin>(PluginClass: new (...args: any[]) => T): boolean;
    /**
     * Get all attached plugins.
     */
    getAll(): readonly BaseGridPlugin[];
    /**
     * Get names of all registered plugins (for debugging).
     */
    getRegisteredPluginNames(): string[];
    /**
     * Get a cell renderer by type name.
     */
    getCellRenderer(type: string): CellRenderer | undefined;
    /**
     * Get a header renderer by type name.
     */
    getHeaderRenderer(type: string): HeaderRenderer | undefined;
    /**
     * Get a cell editor by type name.
     */
    getCellEditor(type: string): CellEditor | undefined;
    /**
     * Get all CSS styles from all plugins as structured data.
     * Returns an array of { name, styles } for each plugin with styles.
     */
    getPluginStyles(): Array<{
        name: string;
        styles: string;
    }>;
    /**
     * Execute processRows hook on all plugins.
     */
    processRows(rows: readonly any[]): any[];
    /**
     * Execute processColumns hook on all plugins.
     */
    processColumns(columns: readonly ColumnConfig[]): ColumnConfig[];
    /**
     * Execute beforeRender hook on all plugins.
     */
    beforeRender(): void;
    /**
     * Execute afterRender hook on all plugins.
     */
    afterRender(): void;
    /**
     * Execute onScrollRender hook on all plugins.
     * Called after scroll-triggered row rendering for lightweight visual state updates.
     */
    onScrollRender(): void;
    /**
     * Get total extra height contributed by plugins (e.g., expanded detail rows).
     * Used to adjust scrollbar height calculations.
     */
    getExtraHeight(): number;
    /**
     * Get extra height from plugins that appears before a given row index.
     * Used by virtualization to correctly position the scroll window.
     */
    getExtraHeightBefore(beforeRowIndex: number): number;
    /**
     * Adjust the virtualization start index based on plugin needs.
     * Returns the minimum start index from all plugins.
     */
    adjustVirtualStart(start: number, scrollTop: number, rowHeight: number): number;
    /**
     * Execute renderRow hook on all plugins.
     * Returns true if any plugin handled the row.
     */
    renderRow(row: any, rowEl: HTMLElement, rowIndex: number): boolean;
    /**
     * Query all plugins with a generic query and collect responses.
     * This enables inter-plugin communication without the core knowing plugin-specific concepts.
     *
     * Common query types are defined in PLUGIN_QUERIES, but plugins can define their own.
     *
     * @param query - The query object containing type and context
     * @returns Array of non-undefined responses from plugins
     */
    queryPlugins<T>(query: PluginQuery): T[];
    /**
     * Execute onKeyDown hook on all plugins.
     * Returns true if any plugin handled the event.
     */
    onKeyDown(event: KeyboardEvent): boolean;
    /**
     * Execute onCellClick hook on all plugins.
     * Returns true if any plugin handled the event.
     */
    onCellClick(event: CellClickEvent): boolean;
    /**
     * Execute onRowClick hook on all plugins.
     * Returns true if any plugin handled the event.
     */
    onRowClick(event: RowClickEvent): boolean;
    /**
     * Execute onHeaderClick hook on all plugins.
     * Returns true if any plugin handled the event.
     */
    onHeaderClick(event: HeaderClickEvent): boolean;
    /**
     * Execute onScroll hook on all plugins.
     */
    onScroll(event: ScrollEvent): void;
    /**
     * Execute onCellMouseDown hook on all plugins.
     * Returns true if any plugin handled the event.
     */
    onCellMouseDown(event: CellMouseEvent): boolean;
    /**
     * Execute onCellMouseMove hook on all plugins.
     * Returns true if any plugin handled the event.
     */
    onCellMouseMove(event: CellMouseEvent): boolean;
    /**
     * Execute onCellMouseUp hook on all plugins.
     * Returns true if any plugin handled the event.
     */
    onCellMouseUp(event: CellMouseEvent): boolean;
    /**
     * Collect horizontal scroll boundary offsets from all plugins.
     * Combines offsets from all plugins that report them.
     *
     * @param rowEl - The row element (optional, for calculating widths from rendered cells)
     * @param focusedCell - The currently focused cell element (optional, to determine if scrolling should be skipped)
     * @returns Combined left and right pixel offsets, plus skipScroll if any plugin requests it
     */
    getHorizontalScrollOffsets(rowEl?: HTMLElement, focusedCell?: HTMLElement): {
        left: number;
        right: number;
        skipScroll?: boolean;
    };
    /**
     * Collect tool panels from all plugins.
     * Returns panels sorted by order (ascending).
     */
    getToolPanels(): {
        plugin: BaseGridPlugin;
        panel: NonNullable<ReturnType<NonNullable<BaseGridPlugin['getToolPanel']>>>;
    }[];
    /**
     * Collect header contents from all plugins.
     * Returns contents sorted by order (ascending).
     */
    getHeaderContents(): {
        plugin: BaseGridPlugin;
        content: NonNullable<ReturnType<NonNullable<BaseGridPlugin['getHeaderContent']>>>;
    }[];
}
//# sourceMappingURL=plugin-manager.d.ts.map