"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.stateTreeSettings = stateTreeSettings;
var _actionTypes = require("../constants/actionTypes");
function stateTreeSettings() {
  let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
    sortAlphabetically: false,
    disableCollection: false
  };
  let action = arguments.length > 1 ? arguments[1] : undefined;
  if (action.type === _actionTypes.CHANGE_STATE_TREE_SETTINGS) {
    return {
      sortAlphabetically: action.sortAlphabetically,
      disableCollection: action.disableCollection
    };
  }
  return state;
}