<script setup lang="ts">
import type { SelectGroupProps } from "reka-ui"
import type { HTMLAttributes } from "vue"
import { reactiveOmit } from "@vueuse/core"
import { SelectGroup } from "reka-ui"
import { cn } from "@/lib/utils"

export interface SelectGroupPrimitiveProps extends SelectGroupProps {
  class?: HTMLAttributes["class"]
}

const props = defineProps<SelectGroupPrimitiveProps>()

const delegatedProps = reactiveOmit(props, "class")
</script>

<template>
  <SelectGroup
    v-bind="delegatedProps"
    :class="cn('p-1 w-full', props.class)"
  >
    <slot />
  </SelectGroup>
</template>
