import { BaseGridPlugin, PluginDependency } from '../../core/plugin/base-plugin';
import { ToolPanelDefinition } from '../../core/types';
import { VisibilityConfig } from './types';
/**
 * Detail for column-reorder-request events emitted when users drag-drop in the visibility panel.
 */
export interface ColumnReorderRequestDetail {
    /** The field name of the column to move */
    field: string;
    /** The source index (before move) */
    fromIndex: number;
    /** The target index (after move) */
    toIndex: number;
}
/**
 * Column Visibility Plugin for tbw-grid
 *
 * @example
 * ```ts
 * new VisibilityPlugin({ enabled: true, allowHideAll: false })
 * ```
 */
export declare class VisibilityPlugin extends BaseGridPlugin<VisibilityConfig> {
    /**
     * Plugin dependencies - VisibilityPlugin optionally uses ReorderPlugin for drag-drop reordering.
     *
     * When ReorderPlugin is present, columns in the visibility panel become draggable.
     */
    static readonly dependencies: PluginDependency[];
    readonly name = "visibility";
    /** Tool panel ID for shell integration */
    static readonly PANEL_ID = "columns";
    readonly styles: string;
    protected get defaultConfig(): Partial<VisibilityConfig>;
    private columnListElement;
    private isDragging;
    private draggedField;
    private draggedIndex;
    private dropIndex;
    /** Clear drag-related classes from all rows in a list. */
    private clearDragClasses;
    detach(): void;
    /**
     * Register the column visibility tool panel with the shell.
     */
    getToolPanel(): ToolPanelDefinition | undefined;
    /**
     * Show the visibility sidebar panel.
     * Opens the tool panel and ensures this section is expanded.
     */
    show(): void;
    /**
     * Hide the visibility sidebar panel.
     */
    hide(): void;
    /**
     * Toggle the visibility sidebar panel section.
     */
    toggle(): void;
    /**
     * Check if a specific column is visible.
     * Delegates to grid.isColumnVisible().
     * @param field - The field name to check
     * @returns True if the column is visible
     */
    isColumnVisible(field: string): boolean;
    /**
     * Set visibility for a specific column.
     * Delegates to grid.setColumnVisible().
     * @param field - The field name of the column
     * @param visible - Whether the column should be visible
     */
    setColumnVisible(field: string, visible: boolean): void;
    /**
     * Get list of all visible column fields.
     * @returns Array of visible field names
     */
    getVisibleColumns(): string[];
    /**
     * Get list of all hidden column fields.
     * @returns Array of hidden field names
     */
    getHiddenColumns(): string[];
    /**
     * Show all columns.
     * Delegates to grid.showAllColumns().
     */
    showAll(): void;
    /**
     * Toggle visibility for a specific column.
     * Delegates to grid.toggleColumnVisibility().
     * @param field - The field name of the column
     */
    toggleColumn(field: string): void;
    /**
     * Show a specific column.
     * Delegates to grid.setColumnVisible().
     * @param field - The field name of the column to show
     */
    showColumn(field: string): void;
    /**
     * Hide a specific column.
     * Delegates to grid.setColumnVisible().
     * @param field - The field name of the column to hide
     */
    hideColumn(field: string): void;
    /**
     * Get all columns with their visibility status.
     * Useful for building visibility UI.
     * @returns Array of column info with visibility status
     */
    getAllColumns(): Array<{
        field: string;
        header: string;
        visible: boolean;
        lockVisible?: boolean;
        utility?: boolean;
    }>;
    /**
     * Check if the sidebar panel is currently open.
     * @returns True if the panel section is expanded
     */
    isPanelVisible(): boolean;
    /**
     * Render the panel content into the shell's tool panel container.
     * Returns a cleanup function.
     */
    private renderPanelContent;
    /**
     * Check if a reorder plugin is present (by name to avoid static import).
     */
    private hasReorderPlugin;
    /**
     * Build the column toggle checkboxes.
     * When a reorder plugin is present, adds drag handles for reordering.
     */
    private rebuildToggles;
    /**
     * Set up drag-and-drop event listeners for a row.
     * On drop, emits a 'column-reorder-request' event for other plugins to handle.
     */
    private setupDragListeners;
}
//# sourceMappingURL=VisibilityPlugin.d.ts.map