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

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

  import { MODULE } from '../target.constant';

  import * as TargetStore from './target';

  export interface State {
    readallbydomain: TargetStore.State;
  }

  export const REDUCERS = {
    readallbydomain: TargetStore.reducer,
  };

  export const EFFECTS = [
    TargetStore.Effects,
  ];

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

  export const ReadAllByDomainSelector = new StateSelector<TargetStore.State>(createSelector(
    selectTargetState,
    (state: State) => state.readallbydomain
  ));
