<script setup lang="ts">
import { DropdownMenuSubContent as ShadcnDropdownMenuSubContent } from '@/components/core/dropdown-menu';
import type {
  UiDropdownMenuSubContentProps,
  UiDropdownMenuSubContentEmits,
} from './types';

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

const props = withDefaults(defineProps<UiDropdownMenuSubContentProps>(), {
  sideOffset: 0,
});

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

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