import type { ObjectOrInterfaceDefinition, QueryDefinition, SimplePropertyDef } from "@osdk/api";
import type { OnChangeFn, SortingState } from "@tanstack/react-table";
import type { ObjectTableProps } from "../ObjectTableApi.js";
import type { OrderBy } from "../utils/types.js";
export interface UseTableSortingProps<
	Q extends ObjectOrInterfaceDefinition,
	RDPs extends Record<string, SimplePropertyDef> = {},
	FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>
> {
	orderBy?: ObjectTableProps<Q, RDPs, FunctionColumns>["orderBy"];
	defaultOrderBy?: ObjectTableProps<Q, RDPs, FunctionColumns>["defaultOrderBy"];
	onOrderByChanged?: ObjectTableProps<Q, RDPs, FunctionColumns>["onOrderByChanged"];
}
export interface UseTableSortingResult<
	Q extends ObjectOrInterfaceDefinition,
	RDPs extends Record<string, SimplePropertyDef> = {}
> {
	sorting: SortingState;
	onSortingChange: OnChangeFn<SortingState>;
	orderByState: OrderBy<Q, RDPs>;
}
export declare const useTableSorting: <
	Q extends ObjectOrInterfaceDefinition,
	RDPs extends Record<string, SimplePropertyDef> = {},
	FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>
>({ orderBy, defaultOrderBy, onOrderByChanged }: UseTableSortingProps<Q, RDPs, FunctionColumns>) => UseTableSortingResult<Q, RDPs>;
