import XEUtils from "xe-utils";
import DomZIndex from "../../../../dom-zindex/es/index.esm.mjs";
import { VxeCore } from "./core.mjs";
import { globalConfigStore } from "./configStore.mjs";
import { setTheme } from "./theme.mjs";
function setConfig(options) {
  if (options) {
    if (options.zIndex) {
      DomZIndex.setCurrent(options.zIndex);
    }
    if (options.theme) {
      setTheme(options.theme);
    }
    XEUtils.merge(globalConfigStore, options);
  }
  return VxeCore;
}
function getConfig(key, defaultValue) {
  return arguments.length ? XEUtils.get(globalConfigStore, key, defaultValue) : globalConfigStore;
}
export {
  getConfig,
  setConfig
};
