<script setup lang="ts">
import type { TagsInputInputProps } from 'reka-ui';
import type { HTMLAttributes } from 'vue';
import { TagsInputInput, useForwardProps } from 'reka-ui';
import { computed } from 'vue';
import { cn, omitClass } from '@/lib/utils';

const props = defineProps<
  TagsInputInputProps & { class?: HTMLAttributes['class'] }
>();

const delegatedProps = computed(() => omitClass(props));

const forwardedProps = useForwardProps(delegatedProps);
</script>

<template>
  <TagsInputInput
    data-slot="tags-input-input"
    :class="
      cn(
        'placeholder:text-muted-foreground flex-1 bg-transparent outline-none',
        props.class,
      )
    "
    v-bind="forwardedProps"
  />
</template>
