import _Dialog from "@alifd/next/es/dialog";
import _extends from "@babel/runtime/helpers/extends";
import _Icon from "@alifd/next/es/icon";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import * as React from 'react';
import { Component } from 'react';
import "./index.scss";
var XtDialog = /*#__PURE__*/function (_Component) {
  _inheritsLoose(XtDialog, _Component);
  function XtDialog() {
    return _Component.apply(this, arguments) || this;
  }
  var _proto = XtDialog.prototype;
  _proto.render = function render() {
    var _this$props = this.props,
      _this$props$title = _this$props.title,
      title = _this$props$title === void 0 ? '配置组件数据' : _this$props$title,
      _this$props$height = _this$props.height,
      height = _this$props$height === void 0 ? '70%' : _this$props$height,
      _this$props$top = _this$props.top,
      top = _this$props$top === void 0 ? '100px' : _this$props$top,
      onClose = _this$props.onClose,
      _this$props$visible = _this$props.visible,
      visible = _this$props$visible === void 0 ? false : _this$props$visible,
      content = _this$props.content,
      _this$props$closeIcon = _this$props.closeIcon,
      closeIcon = _this$props$closeIcon === void 0 ? 'close' : _this$props$closeIcon,
      _this$props$titleIcon = _this$props.titleIcon,
      titleIcon = _this$props$titleIcon === void 0 ? 'edit' : _this$props$titleIcon;
    var style = {
      style: {
        width: this.props.width || '60%',
        borderRadius: '12px',
        boxShadow: '0 9px 29px 0 rgba(0, 0, 0, 0.2)'
      }
    };
    var titleNode = /*#__PURE__*/React.createElement("div", {
      className: "titleStyle"
    }, /*#__PURE__*/React.createElement(_Icon, {
      type: titleIcon,
      size: "small"
    }), /*#__PURE__*/React.createElement("span", null, title));
    var closeIconNode = /*#__PURE__*/React.createElement(_Icon, {
      type: closeIcon,
      size: "xs"
    });
    return /*#__PURE__*/React.createElement(_Dialog, _extends({
      footer: false,
      height: height,
      title: titleNode,
      visible: visible,
      top: top,
      "close-icon": closeIconNode,
      onClose: onClose,
      className: "xt-dialog"
    }, style), content);
  };
  return XtDialog;
}(Component);
XtDialog.displayName = 'XtDialog';
export { XtDialog as default };