import { createSelector } from 'reselect';
import { initialState } from './reducer';

/**
 * Direct selector to the {{ camelCase name }} state domain
 */

const select{{ properCase name }}Domain = state => state.{{ camelCase name }} || initialState;

export const select{{ properCase name }} = () =>
  createSelector(select{{ properCase name }}Domain, substate => substate);

export const selectSomePayLoad = () =>
  createSelector(select{{properCase name}}Domain, substate => substate.somePayLoad);
