<script setup lang="ts">
import { DropdownMenu as ShadcnDropdownMenu } from '@/components/core/dropdown-menu';
import type { UiDropdownMenuProps, UiDropdownMenuEmits } from './types';

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

const props = withDefaults(defineProps<UiDropdownMenuProps>(), {
  open: undefined,
  modal: true,
});

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

<template>
  <ShadcnDropdownMenu
    :open="props.open"
    :modal="props.modal"
    @update:open="emit('update:open', $event)"
  >
    <slot />
  </ShadcnDropdownMenu>
</template>
