'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.reducer = reducer;

var _electron = require('electron');

var _tools = require('views/utils/tools');

const config = _electron.remote.require('./lib/config');

function reducer(state = Object.clone(config.get('')), { type, path, value }) {
  switch (type) {
    case '@@Config':
      state = (0, _tools.reduxSet)(state, path.split('.'), value);
      return state;
    default:
      return state;
  }
}