import type { ObjectOrInterfaceDefinition, Osdk, PrimaryKeyType, PropertyKeys, SimplePropertyDef } from "@osdk/api";
import type { RowSelectionState } from "@tanstack/react-table";
/**
* Payload delivered by {@link UseRowSelectionProps.onRowSelectionChanged}.
* Mirrors the OSDK-level `RowSelectionChange` but without the `objectSet`
* field, which requires OSDK context and is composed in `ObjectTable`.
*/
export interface UseRowSelectionChange<
	Q extends ObjectOrInterfaceDefinition,
	RDPs extends Record<string, SimplePropertyDef> = Record<string, never>
> {
	selectedRows: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>[];
	isSelectAll: boolean;
}
export interface UseRowSelectionProps<
	Q extends ObjectOrInterfaceDefinition,
	RDPs extends Record<string, SimplePropertyDef> = Record<string, never>
> {
	selectionMode?: "single" | "multiple" | "none";
	selectedRows?: PrimaryKeyType<Q>[];
	isAllSelected?: boolean;
	onRowSelectionChanged?: (change: UseRowSelectionChange<Q, RDPs>) => void;
	data: Array<Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>> | undefined;
}
export interface UseRowSelectionResult {
	rowSelection: RowSelectionState;
	isAllSelected: boolean;
	hasSelection: boolean;
	enableRowSelection: boolean;
	onToggleAll: () => void;
	onToggleRow: (rowId: string, rowIndex: number, isShiftClick?: boolean) => void;
}
export declare function useRowSelection<
	Q extends ObjectOrInterfaceDefinition,
	RDPs extends Record<string, SimplePropertyDef> = Record<string, never>
>({ selectionMode, selectedRows, isAllSelected: isAllSelectedProp, onRowSelectionChanged, data }: UseRowSelectionProps<Q, RDPs>): UseRowSelectionResult;
