<script lang='ts' setup>
import type { ComponentInstance } from "vue";
import { Icon } from "@iconify/vue";

defineProps<{
  icon: string;
}>();

const vm = getCurrentInstance()!;

function changeRef(exposed) {
  vm.exposed = exposed;
}

defineExpose({} as ComponentInstance<typeof Icon>);
</script>

<template>
  <Icon v-bind="{ ...$attrs, icon }" :ref="changeRef" />
</template>

<style lang='css' scoped></style>
