import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread";

var _handleActions;

import { handleActions } from 'redux-actions';
import * as C from './constants';
export var initialState = {
  routing: {
    routes: [],
    hash: '/',
    contactLink: '/help'
  },
  display: {
    isMobileOpen: false,
    isSettingsOpen: false
  },
  status: {
    isLoading: 0,
    error: null
  }
};
export var routingReducer = function routingReducer(state, action) {
  return _objectSpread({}, state, {
    routing: _objectSpread({}, state.routing, action.payload)
  });
};
export var displayReducer = function displayReducer(state, action) {
  return _objectSpread({}, state, {
    display: _objectSpread({}, state.display, action.payload)
  });
};
export var statusReducer = function statusReducer(state, action) {
  return _objectSpread({}, state, {
    status: _objectSpread({}, state.status, action.payload)
  });
};
export default handleActions((_handleActions = {}, _defineProperty(_handleActions, C.UPDATE_ROUTING, routingReducer), _defineProperty(_handleActions, C.UPDATE_DISPLAY, displayReducer), _defineProperty(_handleActions, C.UPDATE_STATUS, statusReducer), _handleActions), initialState);