import { Reducer } from 'react'; import type { TableState } from './types'; import type { SearchFunction } from './search'; type SetLoadingAction = { type: 'SetLoading'; payload: boolean; }; type SetSearchApiAction = { type: 'SetSearchApi'; payload: SearchFunction; }; type SetDataAction = { type: 'SetData'; payload: T[]; }; type SetPageAction = { type: 'SetPage'; payload: number; }; type SetSizeAction = { type: 'SetSize'; payload: number; }; type SetTotalAction = { type: 'SetTotal'; payload: number; }; type SetKeywordAction = { type: 'SetKeyword'; payload: string; }; type SetCurrentRecordAction = { type: 'SetCurrentRecord'; payload: T; }; type SetExtraParamsAction = { type: 'SetExtraParams'; payload: Record; }; export type Action = SetLoadingAction | SetSearchApiAction | SetDataAction | SetPageAction | SetSizeAction | SetTotalAction | SetKeywordAction | SetCurrentRecordAction | SetExtraParamsAction; declare const reducer: Reducer, Action>; export default reducer;