1import { StoreState } from 'app/types';
2import { useSelector } from 'react-redux';
3import { UnifiedAlertingState } from '../state/reducers';
4
5export function useUnifiedAlertingSelector<TSelected = unknown>(
6  selector: (state: UnifiedAlertingState) => TSelected,
7  equalityFn?: (left: TSelected, right: TSelected) => boolean
8): TSelected {
9  return useSelector((state: StoreState) => selector(state.unifiedAlerting), equalityFn);
10}
11