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

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

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

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

<template>
  <ListboxGroup
    data-slot="listbox-group"
    :class="cn('overflow-hidden', props.class)"
    v-bind="forwardedProps"
  >
    <slot />
  </ListboxGroup>
</template>
