"use strict";

exports.__esModule = true;
exports["default"] = exports.changeLabelSize = 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 changeLabelSize = (0, _createMetaAction["default"])("changeLabelSize");
exports.changeLabelSize = changeLabelSize;
var newVal = window.localStorage.getItem("labelSize");

// ------------------------------------
// Reducer
// ------------------------------------
var _default = (0, _reduxAct.createReducer)((_createReducer = {}, _createReducer[changeLabelSize] = function (state, payload) {
  localStorage.setItem("labelSize", payload);
  return payload;
}, _createReducer), newVal ? parseInt(newVal) : 8 //  8 is 100% label size
);
exports["default"] = _default;