<script setup lang="ts">
import { PopoverContent as ShadcnPopoverContent } from '@/components/core/popover';
import type { UiPopoverContentProps, UiPopoverContentEmits } from './types';

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

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

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

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