var _createReducer;
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
//./caretPosition.js
import { createReducer } from "redux-act";
import createAction from "./utils/createMetaAction";

// ------------------------------------
// Actions
// ------------------------------------
export var toggleCopyOption = createAction("TOGGLE_COPY_OPTION"); //NOTE!!:: second argument sanitizes actions so no payload is passed

export var defaultCopyOptions = {
  features: true,
  partialFeatures: false,
  parts: true,
  partialParts: false
};

// ------------------------------------
// Reducer
// ------------------------------------
export default createReducer((_createReducer = {}, _createReducer[toggleCopyOption] = function (state, type) {
  var _extends2;
  return _extends({}, state, type === "partialFeatures" && !state[type] && {
    features: true
  }, type === "partialParts" && !state[type] && {
    parts: true
  }, type === "features" && {
    partialFeatures: !state[type]
  }, type === "parts" && {
    partialParts: !state[type]
  }, (_extends2 = {}, _extends2[type] = !state[type], _extends2));
}, _createReducer), defaultCopyOptions);