<script setup>
import { computed } from "vue";
import { resolveIcon } from "../../lib/icons";

const props = defineProps({
  name: { type: String, default: "" },
  class: { type: [String, Object, Array], default: "" },
});

const iconClass = computed(() => resolveIcon(props.name));
</script>

<template>
  <i v-if="iconClass" :class="[iconClass, props.class]" aria-hidden="true" />
</template>
