import type { SortChangeDetail, SortEntry } from "../root/DataGridTable.types";
type TableSortOptions = {
    /**
     * Current sort state. Each entry represents a sorted column.
     * Columns not present in the array are unsorted.
     * Supports multi-column sorting when multiple entries are provided.
     *
     * When provided, the component is controlled - you must also handle `onSortOrderChange`.
     * For uncontrolled usage, use `defaultSortOrder` instead.
     */
    sortOrder?: SortEntry[];
    /**
     * Initial sort state for uncontrolled usage.
     * Use `sortOrder` + `onSortOrderChange` for controlled usage.
     * @default []
     */
    defaultSortOrder?: SortEntry[];
    /**
     * Called when the user clicks a sortable column header.
     * - `sort` — the full updated sort array after cycling: unsorted → asc → desc → unsorted.
     * - `detail` — the specific column that changed, including its new direction (`"none"` means removed).
     */
    onSortOrderChange?: (sortOrder: SortEntry[], detail: SortChangeDetail) => void;
    /**
     * When true, allows multiple columns to be sorted by holding Shift while clicking headers.
     *
     * @default true
     */
    allowMultiSort?: boolean;
};
type UseTableSortResults = {
    /**
     * Handler for when a sortable column header is clicked. Pass the column's `id` as an argument.
     */
    onSortClick: (columnId: string, event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
    /**
     * The current sort state, to be passed to the table header for rendering sort indicators.
     */
    sortState: SortEntry[];
};
declare function useTableSort(options?: TableSortOptions): UseTableSortResults;
export { useTableSort };
export type { TableSortOptions, UseTableSortResults };
