import { combineReducers, Action } from '@ngrx/store';
import { ShelfState } from './shelf.state';
import { searchReducer } from './search';
import { historyReducer } from './history';
import { detailsReducer } from './details';

const _shelfReducer = combineReducers<ShelfState>({
  history: historyReducer,
  search: searchReducer,
  details: detailsReducer,
});

export function shelfReducer(state: ShelfState, action: Action) {
  return _shelfReducer(state, action);
}
