"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const core = require("./src/core.js");
const vue = require("vue");
const config = require("./src/config.js");
const dataStore = require("./src/dataStore.js");
const icon = require("./src/icon.js");
const theme = require("./src/theme.js");
const event = require("./src/event.js");
const resize = require("./src/resize.js");
const i18n = require("./src/i18n.js");
const renderer = require("./src/renderer.js");
const validators = require("./src/validators.js");
const menus = require("./src/menus.js");
const formats = require("./src/formats.js");
const commands = require("./src/commands.js");
const interceptor = require("./src/interceptor.js");
const clipboard = require("./src/clipboard.js");
const permission = require("./src/permission.js");
const log = require("./src/log.js");
const hooks = require("./src/hooks.js");
const useFns = require("./src/useFns.js");
const vm = require("./src/vm.js");
const XEUtils = require("xe-utils");
const installedPlugins = [];
function use(Plugin, options) {
  if (Plugin && Plugin.install) {
    if (installedPlugins.indexOf(Plugin) === -1) {
      Plugin.install(VxeUI, options);
      installedPlugins.push(Plugin);
    }
  }
  return VxeUI;
}
const components = {};
function getComponent(name) {
  return components[name] || null;
}
function hasComponent(name) {
  return !!components[name];
}
function component(comp) {
  if (comp && comp.name) {
    components[comp.name] = comp;
    components[XEUtils.kebabCase(comp.name)] = comp;
  }
}
function renderEmptyElement() {
  return vue.createCommentVNode();
}
function checkVersion(version, pVersion, sVersion) {
  if (version) {
    const vRest = `${version}`.match(/(\d+).(\d+).(\d+)/);
    if (vRest) {
      const pV = XEUtils.toNumber(vRest[1]);
      if (sVersion) {
        const sV = XEUtils.toNumber(vRest[2]);
        return pV >= pVersion && sV >= sVersion;
      }
      return pV >= pVersion;
    }
  }
  return false;
}
const VxeUI = Object.assign(core.VxeCore, {
  renderEmptyElement,
  setTheme: theme.setTheme,
  getTheme: theme.getTheme,
  setConfig: config.setConfig,
  getConfig: config.getConfig,
  setIcon: icon.setIcon,
  getIcon: icon.getIcon,
  renderGlobalIcon: icon.renderGlobalIcon,
  renderCustomIcon: icon.renderCustomIcon,
  setLanguage: i18n.setLanguage,
  hasLanguage: i18n.hasLanguage,
  getLanguage: i18n.getLanguage,
  setI18n: i18n.setI18n,
  getI18n: i18n.getI18n,
  globalEvents: event.globalEvents,
  GLOBAL_EVENT_KEYS: event.GLOBAL_EVENT_KEYS,
  createEvent: event.createEvent,
  globalResize: resize.globalResize,
  renderer: renderer.renderer,
  validators: validators.validators,
  menus: menus.menus,
  formats: formats.formats,
  commands: commands.commands,
  interceptor: interceptor.interceptor,
  clipboard: clipboard.clipboard,
  log: log.log,
  permission: permission.permission,
  globalStore: dataStore.globalStore,
  hooks: hooks.hooks,
  component,
  getComponent,
  hasComponent,
  useFns: useFns.useFns,
  getSlotVNs: vm.getSlotVNs,
  checkVersion,
  use
});
theme.setTheme();
exports.VxeCore = core.VxeCore;
exports.coreVersion = core.coreVersion;
exports.getConfig = config.getConfig;
exports.setConfig = config.setConfig;
exports.globalStore = dataStore.globalStore;
exports.getIcon = icon.getIcon;
exports.renderCustomIcon = icon.renderCustomIcon;
exports.renderGlobalIcon = icon.renderGlobalIcon;
exports.setIcon = icon.setIcon;
exports.getTheme = theme.getTheme;
exports.setTheme = theme.setTheme;
exports.GLOBAL_EVENT_KEYS = event.GLOBAL_EVENT_KEYS;
exports.createEvent = event.createEvent;
exports.globalEvents = event.globalEvents;
exports.globalResize = resize.globalResize;
exports.getI18n = i18n.getI18n;
exports.getLanguage = i18n.getLanguage;
exports.hasLanguage = i18n.hasLanguage;
exports.setI18n = i18n.setI18n;
exports.setLanguage = i18n.setLanguage;
exports.renderer = renderer.renderer;
exports.validators = validators.validators;
exports.menus = menus.menus;
exports.formats = formats.formats;
exports.commands = commands.commands;
exports.interceptor = interceptor.interceptor;
exports.clipboard = clipboard.clipboard;
exports.handleCheckInfo = permission.handleCheckInfo;
exports.permission = permission.permission;
exports.log = log.log;
exports.hooks = hooks.hooks;
exports.useFns = useFns.useFns;
exports.usePermission = useFns.usePermission;
exports.useSize = useFns.useSize;
exports.getSlotVNs = vm.getSlotVNs;
exports.VxeUI = VxeUI;
exports.checkVersion = checkVersion;
exports.component = component;
exports.default = VxeUI;
exports.getComponent = getComponent;
exports.hasComponent = hasComponent;
exports.renderEmptyElement = renderEmptyElement;
exports.use = use;
