"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactstrap = require("reactstrap");
require("./index.css");
function ModalHeader(_ref) {
  let {
    toggle,
    children
  } = _ref;
  let close = null;
  if (toggle) {
    close = /*#__PURE__*/_react.default.createElement("span", {
      className: "sf-editor-close-icon",
      onClick: toggle
    }, /*#__PURE__*/_react.default.createElement("i", {
      className: "iconfont icon-x",
      "aria-hidden": "true"
    }));
  }
  return /*#__PURE__*/_react.default.createElement(_reactstrap.ModalHeader, {
    close: close
  }, children);
}
var _default = exports.default = ModalHeader;