"use strict";

exports.__esModule = true;
exports["default"] = exports.caretPositionUpdate = exports.caretPositionClear = void 0;
var _reduxAct = require("redux-act");
var _createMetaAction = _interopRequireDefault(require("./utils/createMetaAction"));
var _createReducer;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
// ------------------------------------
// Actions
// ------------------------------------
var caretPositionClear = (0, _createMetaAction["default"])("CARET_POSITION_CLEAR");
exports.caretPositionClear = caretPositionClear;
var caretPositionUpdate = (0, _createMetaAction["default"])("CARET_POSITION_UPDATE");

// ------------------------------------
// Reducer
// ------------------------------------
exports.caretPositionUpdate = caretPositionUpdate;
var _default = (0, _reduxAct.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);
exports["default"] = _default;