<template>
  <div class="popover-menu-item" :class="{ 'center': center }" @click="emit('click')">
    <slot></slot>
  </div>
</template>

<script lang="ts" setup>
withDefaults(defineProps<{
  center?: boolean
}>(), {
  center: false,
})

const emit = defineEmits<{
  (event: 'click'): void
}>()
</script>

<style lang="scss" sco1ped>
.popover-menu-item {
  min-width: 80px;
  padding: 10px 10px;
  // border-radius: $borderRadius;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;

  &.center {
    text-align: center;
  }

  &:hover {
    background-color: #f3f4f6;
  }
  & + .popover-menu-item {
    margin-top: 2px;
  }
}
</style>