"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = ConstantHandler;
exports.swap = swap;

var _Components = _interopRequireDefault(require("../components/Components.manifest"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function ConstantHandler(obj, actions) {
  var defaultActions = swap((0, _Components["default"])()["".concat(actions, "Constant")]());
  return defaultActions[obj];
}

function swap(json) {
  var ret = {};

  for (var key in json) {
    ret[json[key]] = key;
  }

  return ret;
}