/**
 * Shared sorting utilities for data-table and data-grid components
 * @countermeasure/web-components/utils/sorting
 */
export type SortDirection = 'asc' | 'desc' | null;
export interface SortState {
    key: string;
    direction: 'asc' | 'desc';
}
/**
 * Compare two unknown cell values with numeric-aware comparison.
 * Returns negative if a < b, positive if a > b, zero if equal.
 */
export declare function compareValues(a: unknown, b: unknown): number;
/**
 * Sort an array of rows by a key, using an accessor to extract the value.
 * Returns a new sorted array (does not mutate the input).
 */
export declare function sortRows<T>(rows: T[], direction: 'asc' | 'desc', accessor: (row: T) => unknown): T[];
/**
 * Cycle sort direction through: null → 'asc' → 'desc' → null
 * Given the current state for a column key, returns the next state.
 */
export declare function cycleSortDirection(currentKey: string | null, currentDirection: SortDirection, targetKey: string): SortState | null;
//# sourceMappingURL=sorting.d.ts.map