<script setup lang="ts">
import { DropdownMenuContent as ShadcnDropdownMenuContent } from '@/components/core/dropdown-menu';
import type {
  UiDropdownMenuContentProps,
  UiDropdownMenuContentEmits,
} from './types';

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

const props = withDefaults(defineProps<UiDropdownMenuContentProps>(), {
  side: 'bottom',
  sideOffset: 4,
  align: 'start',
});

const emit = defineEmits<UiDropdownMenuContentEmits>();
</script>

<template>
  <ShadcnDropdownMenuContent
    :side="props.side"
    :side-offset="props.sideOffset"
    :align="props.align"
    @escape-key-down="emit('escapeKeyDown', $event)"
  >
    <slot />
  </ShadcnDropdownMenuContent>
</template>
