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

import { StateSelector } from 'packages/core/ngrx/store';

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

import * as NoAuthProbeStore from './noauth-probe';

export interface State {
  noAuthProbe: NoAuthProbeStore.State;
}

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

export const EFFECTS = [
  NoAuthProbeStore.Effects,
];

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

export const NoAuthProbeSelector = new StateSelector<NoAuthProbeStore.State>(createSelector(
  selectNoAuthProbeState,
  (state: State) => state.noAuthProbe
));
