<script setup lang="ts">
import { DrawerContent as ShadcnDrawerContent } from '@/components/core/drawer';
import type { UiDrawerContentProps, UiDrawerContentEmits } from './types';

defineOptions({
  name: 'UiDrawerContent',
});

const props = withDefaults(defineProps<UiDrawerContentProps>(), {
  disableOutsidePointerEvents: false,
  showHandle: true,
});
const emit = defineEmits<UiDrawerContentEmits>();
</script>

<template>
  <ShadcnDrawerContent
    :disable-outside-pointer-events="props.disableOutsidePointerEvents"
    :show-handle="props.showHandle"
    @close-auto-focus="emit('closeAutoFocus', $event)"
    @open-auto-focus="emit('openAutoFocus', $event)"
    @focus-outside="emit('focusOutside', $event)"
    @interact-outside="emit('interactOutside', $event)"
    @pointer-down-outside="emit('pointerDownOutside', $event)"
    @escape-key-down="emit('escapeKeyDown', $event)"
  >
    <slot />
  </ShadcnDrawerContent>
</template>
