<!-- 搜索表单 -->
<template>
  <a-space>
    <!--    <a-button type="primary" class="ele-btn-icon" @click="pass">-->
    <!--      <span>通过</span>-->
    <!--    </a-button>-->
    <!--    <a-button type="primary" class="ele-btn-icon" @click="reject">-->
    <!--      <span>拒绝</span>-->
    <!--    </a-button>-->
    <a-button
      danger
      type="primary"
      class="ele-btn-icon"
      :disabled="selection.length === 0"
      @click="removeBatch"
    >
      <template #icon>
        <delete-outlined />
      </template>
      <span>批量删除</span>
    </a-button>
  </a-space>
</template>

<script lang="ts" setup>
  import { watch } from 'vue';

  const emit = defineEmits<{
    (e: 'pass'): void;
    (e: 'reject'): void;
    (e: 'remove'): void;
  }>();

  const props = defineProps<{
    // 勾选的项目
    selection?: [];
  }>();

  // 审核通过
  const pass = () => {
    emit('pass');
  };

  // 拒绝
  const reject = () => {
    emit('reject');
  };

  // 批量删除
  const removeBatch = () => {
    emit('remove');
  };

  // 监听字典id变化
  watch(
    () => props.selection,
    () => {}
  );
</script>
