import { BaseGridPlugin, HeaderClickEvent } from '../../core/plugin/base-plugin';
import { ColumnState } from '../../core/types';
import { MultiSortConfig, SortModel } from './types';
/**
 * Multi-Sort Plugin for tbw-grid
 *
 * Enables sorting by multiple columns at once—hold Shift and click additional column
 * headers to build up a sort stack. Priority badges show the sort order, so users
 * always know which column takes precedence.
 *
 * ## Installation
 *
 * ```ts
 * import { MultiSortPlugin } from '@toolbox-web/grid/plugins/multi-sort';
 * ```
 *
 * ## Configuration Options
 *
 * | Option | Type | Default | Description |
 * |--------|------|---------|-------------|
 * | `maxSortColumns` | `number` | `3` | Maximum columns to sort by |
 * | `showSortIndex` | `boolean` | `true` | Show sort priority badges |
 * | `initialSort` | `SortModel[]` | - | Pre-configured sort order on load |
 *
 * ## Keyboard Shortcuts
 *
 * | Shortcut | Action |
 * |----------|--------|
 * | `Click header` | Sort by column (clears other sorts) |
 * | `Shift + Click` | Add column to multi-sort stack |
 * | `Ctrl + Click` | Toggle sort direction |
 *
 * ## Events
 *
 * | Event | Detail | Description |
 * |-------|--------|-------------|
 * | `sort-change` | `{ sortModel: SortModel[] }` | Fired when sort changes |
 *
 * ## Programmatic API
 *
 * | Method | Signature | Description |
 * |--------|-----------|-------------|
 * | `setSort` | `(sortModel: SortModel[]) => void` | Set sort programmatically |
 * | `getSortModel` | `() => SortModel[]` | Get current sort model |
 * | `clearSort` | `() => void` | Clear all sorting |
 * | `addSort` | `(field, direction) => void` | Add a column to sort |
 * | `removeSort` | `(field) => void` | Remove a column from sort |
 *
 * @example Basic Multi-Column Sorting
 * ```ts
 * import '@toolbox-web/grid';
 * import { MultiSortPlugin } from '@toolbox-web/grid/plugins/multi-sort';
 *
 * const grid = document.querySelector('tbw-grid');
 * grid.gridConfig = {
 *   columns: [
 *     { field: 'name', header: 'Name', sortable: true },
 *     { field: 'department', header: 'Department', sortable: true },
 *     { field: 'salary', header: 'Salary', type: 'number', sortable: true },
 *   ],
 *   plugins: [new MultiSortPlugin({ maxSortColumns: 3, showSortIndex: true })],
 * };
 *
 * grid.addEventListener('sort-change', (e) => {
 *   console.log('Active sorts:', e.detail.sortModel);
 * });
 * ```
 *
 * @example Initial Sort Configuration
 * ```ts
 * new MultiSortPlugin({
 *   initialSort: [
 *     { field: 'department', direction: 'asc' },
 *     { field: 'salary', direction: 'desc' },
 *   ],
 * })
 * ```
 *
 * @see {@link MultiSortConfig} for all configuration options
 * @see {@link SortModel} for the sort model structure
 *
 * @internal Extends BaseGridPlugin
 */
export declare class MultiSortPlugin extends BaseGridPlugin<MultiSortConfig> {
    /** @internal */
    readonly name = "multiSort";
    /** @internal */
    readonly styles: string;
    /** @internal */
    protected get defaultConfig(): Partial<MultiSortConfig>;
    private sortModel;
    /** @internal */
    detach(): void;
    /** @internal */
    processRows(rows: readonly unknown[]): unknown[];
    /** @internal */
    onHeaderClick(event: HeaderClickEvent): boolean;
    /** @internal */
    afterRender(): void;
    /**
     * Get the current sort model.
     * @returns Copy of the current sort model
     */
    getSortModel(): SortModel[];
    /**
     * Set the sort model programmatically.
     * @param model - New sort model to apply
     */
    setSortModel(model: SortModel[]): void;
    /**
     * Clear all sorting.
     */
    clearSort(): void;
    /**
     * Get the sort index (1-based) for a specific field.
     * @param field - Field to check
     * @returns 1-based index or undefined if not sorted
     */
    getSortIndex(field: string): number | undefined;
    /**
     * Get the sort direction for a specific field.
     * @param field - Field to check
     * @returns Sort direction or undefined if not sorted
     */
    getSortDirection(field: string): 'asc' | 'desc' | undefined;
    /**
     * Return sort state for a column if it's in the sort model.
     * @internal
     */
    getColumnState(field: string): Partial<ColumnState> | undefined;
    /**
     * Apply sort state from column state.
     * Rebuilds the sort model from all column states.
     * @internal
     */
    applyColumnState(field: string, state: ColumnState): void;
}
//# sourceMappingURL=MultiSortPlugin.d.ts.map