var _createReducer;
//./caretPosition.js
import { createReducer } from "redux-act";
import createAction from "./utils/createMetaAction";

// ------------------------------------
// Actions
// ------------------------------------
export var toggleReadOnlyMode = createAction("TOGGLE_READ_ONLY_MODE", function () {}); //NOTE!!:: second argument sanitizes actions so no payload is passed
export var updateReadOnlyMode = createAction("UPDATE_READ_ONLY_MODE");

// ------------------------------------
// Reducer
// ------------------------------------
export default createReducer((_createReducer = {}, _createReducer[updateReadOnlyMode] = function (state, payload) {
  return payload;
}, _createReducer[toggleReadOnlyMode] = function (state) {
  return !state;
}, _createReducer), true);