"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const vue = require("vue");
const XEUtils = require("xe-utils");
const core = require("./core.js");
const iconStore = require("./iconStore.js");
const vm = require("./vm.js");
function setIcon(options) {
  if (options) {
    Object.assign(iconStore.iconConfigStore, options);
  }
  return core.VxeCore;
}
function getIcon(key) {
  return arguments.length ? XEUtils.get(iconStore.iconConfigStore, key) : iconStore.iconConfigStore;
}
function renderGlobalIcon(name) {
  const icon = getIcon(name);
  return renderCustomIcon(icon, name);
}
function renderCustomIcon(icon, name) {
  if (XEUtils.isFunction(icon)) {
    return vue.h("span", {}, vm.getSlotVNs(icon({ name })));
  }
  return vue.h("i", {
    class: icon
  });
}
exports.getIcon = getIcon;
exports.renderCustomIcon = renderCustomIcon;
exports.renderGlobalIcon = renderGlobalIcon;
exports.setIcon = setIcon;
