<script lang="ts" setup>
import type { DropdownMixedOption } from 'naive-ui/es/dropdown/src/interface'
import type { PropType } from 'vue'

defineOptions({ name: 'Action' })

defineProps({
  options: {
    type: Array as PropType<DropdownMixedOption[]>,
    default: null,
    required: true,
  },
  select: {
    type: Function as PropType<Function>,
    default: () => { },
  },
  id: {
    type: String,
    default: '',
  },
})
</script>

<template>
  <div :data-id="id">
    <n-dropdown trigger="hover" :options="options" @select="(select as any)">
      <SvgIcon name="more-hor" size="20" />
    </n-dropdown>
  </div>
</template>
