"use strict";

require("core-js/modules/es.object.define-property.js");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.FcrGlobalDialog = void 0;
var _ = require(".");
var _icon = require("../icon");
var _type = require("../icon/type");
require("./global-dialog.css");
var _jsxRuntime = require("react/jsx-runtime");
var FcrGlobalDialog = exports.FcrGlobalDialog = function FcrGlobalDialog(props) {
  var visible = props.visible,
    afterClose = props.afterClose,
    onClose = props.onClose,
    _props$width = props.width,
    width = _props$width === void 0 ? 490 : _props$width,
    children = props.children,
    header = props.header,
    headerWrapperStyle = props.headerWrapperStyle;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_.BaseDialog, {
    destroyOnClose: true,
    width: width,
    wrapClassName: "fcr-global-dialog",
    visible: visible,
    afterClose: afterClose,
    maskClosable: false,
    closable: false,
    children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
      className: "fcr-global-dialog-wrapper",
      children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
        className: "fcr-global-dialog-header",
        style: headerWrapperStyle,
        children: [header, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
          className: "fcr-global-dialog-header-close",
          onClick: onClose,
          children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
            type: _type.FcrIconType.FCR_BTN_LOADING,
            size: 16
          })
        })]
      }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        className: "fcr-global-dialog-body",
        children: children
      })]
    })
  });
};