<script setup lang="ts">
    import { computed, defineProps } from 'vue';
    import { UIColorValues, UIIconsValues } from '@/UI-kit/types';

    export interface ISvgIconProps {
        name: UIIconsValues;
        color?: UIColorValues | null;
    }

    const props = withDefaults(defineProps<ISvgIconProps>(), {
        color: null,
    });

    const style = computed(() => ({
        color: props.color,
    }));
</script>

<template>
    <component :is="name" :style="style" />
</template>
