import constants from "../components/Components.manifest";

export default function ConstantHandler(obj, actions) {
    let defaultActions = swap(constants()[`${actions}Constant`]());
    return defaultActions[obj];
}

export function swap(json) {
  let ret = {};
  for (let key in json) {
      ret[json[key]] = key;
  }
  return ret;
}