import { Dispatch, Reducer } from 'react'; import { UseCollectionOptions, CollectionState, SortingState, UseCollectionResult, CollectionRef, PropertyFilterQuery, CollectionActions } from './interfaces'; import { ItemsTree } from './operations/items-tree'; interface SelectionAction { type: 'selection'; selectedItems: ReadonlyArray; } interface ExpansionAction { type: 'expansion'; expandedItems: ReadonlyArray; } interface SortingAction { type: 'sorting'; sortingState: SortingState; } interface PaginationAction { type: 'pagination'; pageIndex: number; } interface FilteringAction { type: 'filtering'; filteringText: string; } interface PropertyFilteringAction { type: 'property-filtering'; query: PropertyFilterQuery; } type Action = SelectionAction | ExpansionAction | SortingAction | PaginationAction | FilteringAction | PropertyFilteringAction; export type CollectionReducer = Reducer, Action>; export declare function collectionReducer(state: CollectionState, action: Action): CollectionState; export declare function createActions({ dispatch, collectionRef, }: { dispatch: Dispatch>; collectionRef: React.RefObject; }): CollectionActions; export declare function createSyncProps(options: UseCollectionOptions, { filteringText, sortingState, selectedItems, expandedItems, currentPageIndex, propertyFilteringQuery, }: CollectionState, actions: CollectionActions, collectionRef: React.RefObject, { pagesCount, actualPageIndex, allItems, allPageItems, itemsTree, }: { pagesCount?: number; actualPageIndex?: number; allItems: ReadonlyArray; allPageItems: ReadonlyArray; itemsTree: ItemsTree; }): Pick, 'collectionProps' | 'filterProps' | 'paginationProps' | 'propertyFilterProps'>; export {};