import { BaseDialog } from '.';
import { FcrIcon } from '../icon';
import { FcrIconType } from '../icon/type';
import './global-dialog.css';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
export var 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__*/_jsx(BaseDialog, {
    destroyOnClose: true,
    width: width,
    wrapClassName: "fcr-global-dialog",
    visible: visible,
    afterClose: afterClose,
    maskClosable: false,
    closable: false,
    children: /*#__PURE__*/_jsxs("div", {
      className: "fcr-global-dialog-wrapper",
      children: [/*#__PURE__*/_jsxs("div", {
        className: "fcr-global-dialog-header",
        style: headerWrapperStyle,
        children: [header, /*#__PURE__*/_jsx("div", {
          className: "fcr-global-dialog-header-close",
          onClick: onClose,
          children: /*#__PURE__*/_jsx(FcrIcon, {
            type: FcrIconType.FCR_BTN_LOADING,
            size: 16
          })
        })]
      }), /*#__PURE__*/_jsx("div", {
        className: "fcr-global-dialog-body",
        children: children
      })]
    })
  });
};