import React from 'react';
import { Modal } from 'antd';
import EvaluateTaskPersonnelSelector from '@/components/EvaluateTaskPersonnelSelector/EvaluateTaskPersonnelSelector';
import type { PersonnelItem } from '@/servers/types/evaluator';

interface BatchEvaluatorModalProps {
  visible: boolean;
  onCancel: () => void;
  onSelect: (selectedEvaluators: PersonnelItem[]) => void;
  selectedPersonnel?: PersonnelItem[];
}

const BatchEvaluatorModal: React.FC<BatchEvaluatorModalProps> = ({
  visible,
  onCancel,
  onSelect,
  selectedPersonnel = [],
}) => {
  return (
    <Modal
      title="批量选择评价人员"
      visible={visible}
      onCancel={onCancel}
      footer={null}
      width={700}
      destroyOnClose={false}
    >
      <EvaluateTaskPersonnelSelector
        onSelect={onSelect}
        selectedPersonnel={selectedPersonnel}
      />
    </Modal>
  );
};

export default BatchEvaluatorModal;
