<script setup lang="ts">
import { SelectItem as ShadcnSelectItem } from '@/components/core/select';
import type { UiSelectItemProps } from './types';

defineOptions({
  name: 'UiSelectItem',
});

const props = withDefaults(defineProps<UiSelectItemProps>(), {
  disabled: false,
  textValue: undefined,
});
</script>

<template>
  <ShadcnSelectItem
    :value="props.value"
    :disabled="props.disabled"
    :text-value="props.textValue"
  >
    <template v-if="$slots['right-icon']" #right-icon>
      <slot name="right-icon" />
    </template>
    <template v-if="$slots['indicator-icon']" #indicator-icon>
      <slot name="indicator-icon" />
    </template>
    <slot />
  </ShadcnSelectItem>
</template>
