import Button from "../../pageElements/Button";
import Modal from "react-bootstrap/Modal";

const ConfirmModal = ({
  onCancel,
  onConfirm,
  buttonLabelText,
  modalText,
  isBusy,
}) => {
  return (
    <Modal show="true" onHide={onCancel} size="lg">
      <Modal.Header closeButton>
        <Modal.Title>Confirmation</Modal.Title>
      </Modal.Header>
      <Modal.Body>{modalText}</Modal.Body>
      <Modal.Footer>
        <Button
          disabled={isBusy}
          className="secondary-button"
          onClick={onCancel}
          labelText="Cancel"
        />
        <Button
          disabled={isBusy}
          className="primary-button"
          onClick={onConfirm}
          labelText={buttonLabelText}
        />
      </Modal.Footer>
    </Modal>
  );
};

export default ConfirmModal;
