import { defineComponent, computed, createElementBlock, openBlock, mergeProps, unref, renderSlot } from "vue";
import { iconProps as p } from "./icon.mjs";
import c from "../../../_virtual/plugin-vue_export-helper.mjs";
import { useNamespace as q } from "../../../hooks/use-namespace/index.mjs";
import { isUndefined as t } from "../../../utils/types.mjs";
import { addUnit as u } from "../../../utils/dom/style.mjs";
const k = defineComponent({
  name: "ElIcon",
  inheritAttrs: false
}), y = /* @__PURE__ */ defineComponent({
  ...k,
  props: p,
  setup(n) {
    const s = n, c2 = q("icon"), i = computed(() => {
      const { size: o, color: e } = s;
      return !o && !e ? {} : {
        fontSize: t(o) ? void 0 : u(o),
        "--color": e
      };
    });
    return (o, e) => (openBlock(), createElementBlock("i", mergeProps({
      class: unref(c2).b(),
      style: unref(i)
    }, o.$attrs), [
      renderSlot(o.$slots, "default")
    ], 16));
  }
});
var U = /* @__PURE__ */ c(y, [["__file", "icon.vue"]]);
export {
  U as default
};
