    )
  );

const dict = {
  [EAGER_EVALUATION_TOGGLE]: "eagerEvaluation",
  [WARNING_GROUPS_TOGGLE]: "groupWarnings",
  [AUTOCOMPLETE_TOGGLE]: "autocomplete",
};

function prefs(state = PrefState(), action) {
  const pref = dict[action.type];
  if (pref) {
    return {
      ...state,
      [pref]: !state[pref],
    };
  }

  return state;
}

module.exports = {
  PrefState,
  prefs,
};
PK