import { Reducer } from 'react'; import { PillTabsProps } from '../PillTabs'; import { TableSortDirection } from '../Table'; import { StatefulTableColumn, StatefulTablePillTabFilter } from './StatefulTable'; interface State { activePills: string[]; currentItems: T[]; columns: Array & { isSortable: boolean; }>; filteredItems: T[]; isPaginationEnabled: boolean; items: T[]; pagination: { currentPage: number; itemsPerPage: number; itemsPerPageOptions: number[]; totalItems: number; }; pillTabsProps?: PillTabsProps; searchValue?: string; submittedSearchValue?: string; selectedItems: T[]; sortable: { direction: TableSortDirection; columnHash?: string; }; } interface InitArgs { columns: Array>; defaultSelected: T[]; items: T[]; pagination: boolean; } export declare const createReducerInit: () => ({ columns, defaultSelected, items, pagination }: InitArgs) => State; export type Action = { type: 'COLUMNS_CHANGED'; columns: Array>; } | { type: 'ITEMS_CHANGED'; items: T[]; isPaginationEnabled: boolean; } | { type: 'ITEMS_PER_PAGE_CHANGE'; itemsPerPage: number; } | { type: 'PAGE_CHANGE'; page: number; } | { type: 'SELECTED_ITEMS'; selectedItems: T[]; } | { type: 'SORT'; column: StatefulTableColumn; direction: TableSortDirection; } | { type: 'SET_PILL_TABS_PROPS'; pillTabsProps: PillTabsProps; } | { type: 'SEARCH_VALUE_CHANGE'; value: string; } | { type: 'TOGGLE_PILL'; pillId: string; filter: StatefulTablePillTabFilter['filter']; } | { type: 'ON_SEARCH_SUBMIT'; filterPills?: StatefulTablePillTabFilter['filter']; }; export declare const createReducer: () => Reducer, Action>; export {}; //# sourceMappingURL=reducer.d.ts.map