import {
  createSelector,
  createFeatureSelector,
} from '@ngrx/store';

import { MODULE } from '../noauth-probe.constant';

import * as NoAuthProbeEntityStore from './entity/noauth-probe';

export interface State {
  noAuthProbe: NoAuthProbeEntityStore.State;
}

export const REDUCERS = {
  noAuthProbe: NoAuthProbeEntityStore.reducer,
};

export const EFFECTS = [
  NoAuthProbeEntityStore.Effects,
];

export const selectState = createFeatureSelector<State>(MODULE.name);

export const NoAuthProbeEntitySelector = NoAuthProbeEntityStore.getSelectors(createSelector(
  selectState,
  (state: State) => state.noAuthProbe
));
