import { BaseGridPlugin } from '../../core/plugin/base-plugin';
import { ReorderConfig } from './types';
/**
 * Column Reorder Plugin for tbw-grid
 *
 * Lets users rearrange columns by dragging and dropping column headers. Supports smooth
 * FLIP animations, fade transitions, or instant reordering. Animation respects the
 * grid-level `animation.mode` setting.
 *
 * ## Installation
 *
 * ```ts
 * import { ReorderPlugin } from '@toolbox-web/grid/plugins/reorder';
 * ```
 *
 * ## Configuration Options
 *
 * | Option | Type | Default | Description |
 * |--------|------|---------|-------------|
 * | `animation` | `false \| 'flip' \| 'fade'` | `'flip'` | Animation type for column moves |
 * | `animationDuration` | `number` | `200` | Animation duration in ms |
 *
 * ## Keyboard Shortcuts
 *
 * | Key | Action |
 * |-----|--------|
 * | `Alt + ←` | Move focused column left |
 * | `Alt + →` | Move focused column right |
 *
 * ## Events
 *
 * | Event | Detail | Cancelable | Description |
 * |-------|--------|------------|-------------|
 * | `column-move` | `{ field, fromIndex, toIndex, columnOrder }` | Yes | Fired when a column move is attempted |
 *
 * @example Basic Drag-and-Drop Reordering
 * ```ts
 * import '@toolbox-web/grid';
 * import { ReorderPlugin } from '@toolbox-web/grid/plugins/reorder';
 *
 * const grid = document.querySelector('tbw-grid');
 * grid.gridConfig = {
 *   columns: [
 *     { field: 'id', header: 'ID' },
 *     { field: 'name', header: 'Name' },
 *     { field: 'email', header: 'Email' },
 *   ],
 *   plugins: [new ReorderPlugin({ animation: 'flip', animationDuration: 200 })],
 * };
 *
 * // Persist column order
 * grid.addEventListener('column-move', (e) => {
 *   localStorage.setItem('columnOrder', JSON.stringify(e.detail.columnOrder));
 * });
 * ```
 *
 * @example Prevent Moves That Break Group Boundaries
 * ```ts
 * grid.addEventListener('column-move', (e) => {
 *   if (!isValidMoveWithinGroup(e.detail.field, e.detail.fromIndex, e.detail.toIndex)) {
 *     e.preventDefault(); // Column snaps back to original position
 *   }
 * });
 * ```
 *
 * @see {@link ReorderConfig} for all configuration options
 * @see {@link ColumnMoveDetail} for the event detail structure
 * @see {@link GroupingColumnsPlugin} for column group integration
 *
 * @internal Extends BaseGridPlugin
 */
export declare class ReorderPlugin extends BaseGridPlugin<ReorderConfig> {
    /** @internal */
    readonly name = "reorder";
    /** @internal */
    readonly styles: string;
    /** @internal */
    protected get defaultConfig(): Partial<ReorderConfig>;
    /**
     * Resolve animation type from plugin config.
     * Uses base class isAnimationEnabled to respect grid-level settings.
     */
    private get animationType();
    /**
     * Get animation duration, allowing plugin config override.
     * Uses base class animationDuration for default.
     */
    protected get animationDuration(): number;
    private isDragging;
    private draggedField;
    private draggedIndex;
    private dropIndex;
    /**
     * Check if a column can be moved, considering both column config and plugin queries.
     */
    private canMoveColumnWithPlugins;
    /**
     * Clear all drag-related classes from header cells.
     */
    private clearDragClasses;
    /** @internal */
    attach(grid: import('../../core/plugin/base-plugin').GridElement): void;
    /** @internal */
    detach(): void;
    /** @internal */
    afterRender(): void;
    /**
     * Handle Alt+Arrow keyboard shortcuts for column reordering.
     * @internal
     */
    onKeyDown(event: KeyboardEvent): boolean | void;
    /**
     * Get the current column order from the grid.
     * @returns Array of field names in display order
     */
    getColumnOrder(): string[];
    /**
     * Move a column to a new position.
     * @param field - The field name of the column to move
     * @param toIndex - The target index
     */
    moveColumn(field: string, toIndex: number): void;
    /**
     * Set a specific column order.
     * @param order - Array of field names in desired order
     */
    setColumnOrder(order: string[]): void;
    /**
     * Reset column order to the original configuration order.
     */
    resetColumnOrder(): void;
    /**
     * Capture header cell positions before reorder.
     */
    private captureHeaderPositions;
    /**
     * Apply FLIP animation for column reorder.
     * Uses CSS transitions - JS sets initial transform and toggles class.
     * @param oldPositions - Header positions captured before DOM change
     */
    private animateFLIP;
    /**
     * Apply crossfade animation for moved columns.
     * Uses CSS keyframes - JS just toggles classes.
     */
    private animateFade;
    /**
     * Update column order with configured animation.
     */
    private updateColumnOrder;
}
//# sourceMappingURL=ReorderPlugin.d.ts.map