import { ColumnConfig, InternalGrid, SortState } from '../types';
/**
 * Default comparator for sorting values.
 * Handles nulls (pushed to end), numbers, and string fallback.
 */
export declare function defaultComparator(a: unknown, b: unknown): number;
/**
 * Built-in sort implementation using column comparator or default.
 * This is the default sortHandler when none is configured.
 */
export declare function builtInSort<T>(rows: T[], sortState: SortState, columns: ColumnConfig<T>[]): T[];
/**
 * Cycle sort state for a column: none -> ascending -> descending -> none.
 * Restores original row order when clearing sort.
 */
export declare function toggleSort(grid: InternalGrid, col: ColumnConfig<any>): void;
/**
 * Apply a concrete sort direction to rows.
 *
 * Uses custom sortHandler from gridConfig if provided, otherwise uses built-in sorting.
 * Supports both sync and async handlers (for server-side sorting).
 */
export declare function applySort(grid: InternalGrid, col: ColumnConfig<any>, dir: 1 | -1): void;
//# sourceMappingURL=sorting.d.ts.map