import { reducers as appReducers } from './app';

export { actions as appActions } from './app';

const reducers = [appReducers];

const initialState = {
  loading: true,
  id: null,
  name: '',
  config: {},
  pages: []
};

export default function reducer(state = initialState, action) {
  let newState;
  switch (action.type) {
    default:
      newState = state;
      break;
  }
  return reducers.reduce((s, r) => r(s, action), newState);
}
