import { TableItemGroupByType, TableState } from '../../types'; import { TableProps } from '../../Table'; import { GroupTitleInterface } from '../GroupBy'; export interface SelectDataObject { isSelect: boolean; isIndeterminate?: boolean; isCheckboxDisabled?: boolean; } type ToggleSelectRowAction = (item: T, onSuccess?: (state: TableState) => void) => void; export interface SelectRowService { getSelectedRows: (currentState?: TableState) => NonNullable['selected']>; getData: () => T[]; isRowSelected: (id: T | TableItemGroupByType>, selectedItems?: (T | GroupTitleInterface)[]) => boolean; isRowIndeterminated: (id: T) => boolean; isRowCheckboxDisabled: (id: T) => boolean; selectRow: ToggleSelectRowAction; disableCheckboxRow: (items: T[]) => void; indeterminateRow: ToggleSelectRowAction; disableCheckbox: ToggleSelectRowAction; deselectRow: ToggleSelectRowAction; toggleSelectRow: (item: T | 'all', data: SelectDataObject, onSuccess?: (state: TableState) => void) => void; toggleSelectGroup: (group: GroupTitleInterface, isSelect: boolean, onSuccess?: (state: TableState) => void) => void; isGroupSelected: (group: GroupTitleInterface) => boolean; isGroupIndeterminated: (group: GroupTitleInterface) => boolean; isSelectedAll: (data: (T | GroupTitleInterface)[], selectedItems?: (T | GroupTitleInterface)[]) => boolean; selectAll: (items: T[], onSuccess?: (state: TableState) => void) => void; deselectAll: (onSuccess?: (state: TableState) => void) => void; } export declare const selectRowService: (getState: () => TableState, updateState: (id: string, newState: TableState | ((prev: TableState) => TableState)) => void, _getData?: () => T[]) => SelectRowService; export {};