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

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

import { State } from './state';

import { reducer as appReducer } from './app/reducers';
import { reducer as appAuthenticationReducer } from './authentication/reducers';

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