<script setup lang="ts">
import { computed, useAttrs } from 'vue';
import { cn, omitClass } from '@/lib/utils';

defineOptions({ inheritAttrs: false });

const attrs = useAttrs();
const passthroughAttrs = computed(() =>
  omitClass(attrs as Record<string, unknown>),
);
const attrClass = computed(() => (attrs.class as string | undefined) ?? '');
</script>

<template>
  <div
    v-bind="passthroughAttrs"
    data-slot="sidebar-group"
    data-sidebar="group"
    :class="cn('relative flex w-full min-w-0 flex-col gap-2 p-0', attrClass)"
  >
    <slot />
  </div>
</template>
