import { get, set, clone, has } from "lodash";
import appConfig from "../../app.config.json";
let gAppConfig = appConfig;
const setAppConfig = (config) => {
  gAppConfig = config;
};
const getAppConfigValue = (key = "", defaultValue = null) => clone(get(gAppConfig, key, defaultValue));
const setAppConfigValue = (key, value) => set(gAppConfig, key, value);
const hasItem = (key = "") => has(gAppConfig, key);
export {
  getAppConfigValue,
  hasItem,
  setAppConfig,
  setAppConfigValue
};
