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

// ------------------------------------
// Actions
// ------------------------------------
export var caretPositionClear = createAction("CARET_POSITION_CLEAR");
export var caretPositionUpdate = createAction("CARET_POSITION_UPDATE");

// ------------------------------------
// Reducer
// ------------------------------------
export default createReducer((_createReducer = {
  SELECTION_LAYER_UPDATE: function SELECTION_LAYER_UPDATE() {
    //clear the caret if the selection layer is updated!
    return -1;
  }
}, _createReducer[caretPositionClear] = function () {
  return -1;
}, _createReducer[caretPositionUpdate] = function (unused, payload) {
  return typeof payload === "string" ? parseInt(payload, 10) : payload;
}, _createReducer), -1);