import type { Key, Selection } from '@react-types/shared'; import { type KeyedItem, type SelectionMaybeInverted, type SelectionT } from '@deephaven/utils'; /** * Returns the number of selected items or 'all' if all items are selected. * @param size Total size of collection that can have selections * @param selection Set of selected keys or 'all' */ export declare function getSelectedItemCountOrAll(size: number, selection: Selection): number | 'all'; /** * Check 2 SelectionT objects for value equality. * @param selectionA * @param selectionB */ export declare function isSelectionEqual(selectionA: SelectionT, selectionB: SelectionT): boolean; /** * Check 2 `SelectionMaybeInverted` instances for value equality. * @param selectionA * @param selectionB */ export declare function isSelectionMaybeInvertedEqual(selectionA: SelectionMaybeInverted, selectionB: SelectionMaybeInverted): boolean; /** * Map a React Spectrum `Selection` to another `Selection` * @param selectedItemKeys * @param getItem * @param mapItem */ export declare function mapSelection(selectedItemKeys: Selection, getItem: (key: Key) => KeyedItem | undefined, mapItem: (item: KeyedItem) => TMap): SelectionT; /** * Takes a Selection state and determines if there is a more optimal selection * that can be used. For example, if the user selects all and then deselects an * item, we want to filter by "not that value" instead of equal to all selected * values. Similarly, if 'all' items are selected, we want to optimize this as * "no filter". * @param selection The selection to optimize * @param totalRecords The total number of records that can potentially be selected * @param getKey A function to get the key for a given index. */ export declare function optimizeSelection(selection: Selection, totalRecords: number, getKey: (i: number) => string): { selection: Selection; isInverted: boolean; }; //# sourceMappingURL=SelectionUtils.d.ts.map