<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-footer"
    data-sidebar="footer"
    :class="cn('flex flex-col gap-2 p-2', attrClass)"
  >
    <slot />
  </div>
</template>
