"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _vtxModal = _interopRequireDefault(require("@vtx/components/lib/vtx-modal"));
var _antd = require("antd");
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
var ConfigModalWrap = function ConfigModalWrap(props) {
  var onCancel = props.onCancel,
    children = props.children,
    onFinish = props.onFinish,
    alias = props.alias,
    form = props.form;
  var modalProps = {
    title: /*#__PURE__*/_react["default"].createElement(_vtxModal["default"].Title, {
      text: alias,
      subtitle: "\u914D\u7F6E"
    }),
    visible: true,
    destroyOnClose: true,
    size: 'small',
    width: 700,
    onCancel: onCancel
  };
  return /*#__PURE__*/_react["default"].createElement(_vtxModal["default"], _extends({}, modalProps, {
    onOk: function onOk() {
      return form.submit();
    }
  }), /*#__PURE__*/_react["default"].createElement(_antd.Form, {
    form: form,
    onFinish: onFinish
  }, children));
};
var _default = exports["default"] = ConfigModalWrap;
//# sourceMappingURL=ConfigModalWrap.js.map
