import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, createElementVNode } from 'vue';
import remixiconSymbol from 'remixicon/fonts/remixicon.symbol.svg';

"use strict";
const _hoisted_1 = ["xlink:href"];
const __default__ = defineComponent({
  name: "me-svg-icon"
});
var script = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    name: { type: String, required: true },
    color: { type: String, required: false, default: "#0000000" },
    size: { type: Number, required: false, default: 16 }
  },
  setup(__props) {
    const props = __props;
    const svgName = computed(() => {
      if (!props.name) return "";
      if (props.name.startsWith("ri-")) {
        return `${remixiconSymbol}#${props.name}`;
      } else {
        return props.name;
      }
    });
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock(
        "svg",
        {
          class: "icon",
          "aria-hidden": "true",
          style: normalizeStyle({ color: __props.color, "font-size": __props.size ? `${__props.size}px` : "inherit" })
        },
        [
          createElementVNode("use", { "xlink:href": svgName.value }, null, 8, _hoisted_1)
        ],
        4
        /* STYLE */
      );
    };
  }
});

export { script as default };
//# sourceMappingURL=svg-icon.vue2.mjs.map
