import { InjectionToken } from '@angular/core';

import { combineReducers, Action, ActionReducerMap } from '@ngrx/store';
import * as fromRouter from '@ngrx/router-store';

import { State } from './state';

import { reducer as authenticationReducer } from './authentication/reducers';

export const ROOT_REDUCERS = new InjectionToken<
  ActionReducerMap<State, Action>
>('Root reducers token', {
  factory: () => ({
    appRouter: fromRouter.routerReducer,
    appAuthentication: authenticationReducer
  })
});
