"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _core = require("@material-ui/core");

var AlertDialog = function AlertDialog(_ref) {
  var text = _ref.text,
      title = _ref.title,
      onClose = _ref.onClose,
      onConfirm = _ref.onConfirm,
      open = _ref.open;
  return /*#__PURE__*/_react["default"].createElement(_core.Dialog, {
    open: open,
    onClose: onClose
  }, title && /*#__PURE__*/_react["default"].createElement(_core.DialogTitle, null, title), text && /*#__PURE__*/_react["default"].createElement(_core.DialogContent, null, /*#__PURE__*/_react["default"].createElement(_core.DialogContentText, null, text)), /*#__PURE__*/_react["default"].createElement(_core.DialogActions, null, onClose && /*#__PURE__*/_react["default"].createElement(_core.Button, {
    onClick: onClose,
    color: "primary"
  }, "CANCEL"), onConfirm && /*#__PURE__*/_react["default"].createElement(_core.Button, {
    autoFocus: true,
    onClick: onConfirm,
    color: "primary"
  }, "OK")));
};

AlertDialog.propTypes = {
  text: _propTypes["default"].string,
  title: _propTypes["default"].string,
  onClose: _propTypes["default"].func,
  onConfirm: _propTypes["default"].func,
  open: _propTypes["default"].bool
};
var _default = AlertDialog;
exports["default"] = _default;
//# sourceMappingURL=alert-dialog.js.map