<script setup lang="ts">
import { Primitive } from 'reka-ui';
import { cn } from '@/lib/utils';

defineOptions({ inheritAttrs: false });
</script>

<template>
  <Primitive
    v-bind="$attrs"
    data-slot="sidebar-group-label"
    data-sidebar="group-label"
    :class="
      cn(
        'ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',
        'group-data-[collapsible=icon]:hidden',
        $attrs.class ?? '',
      )
    "
  >
    <slot />
  </Primitive>
</template>
