/* eslint-disable import/order */
/* eslint-disable no-nested-ternary */
import React from 'react';
import "./titlebar.less";
import XClose from '@pisell/icon/es/XClose';
import LeftOutlined from '@ant-design/icons/LeftOutlined';
var EPopupTitleBarVariantType = /*#__PURE__*/function (EPopupTitleBarVariantType) {
  EPopupTitleBarVariantType["BackTitleClose"] = "back-title-cancel";
  EPopupTitleBarVariantType["LeftTitleClose"] = "left-title-close";
  return EPopupTitleBarVariantType;
}(EPopupTitleBarVariantType || {});
export default (function (_ref) {
  var _ref$type = _ref.type,
    type = _ref$type === void 0 ? EPopupTitleBarVariantType.LeftTitleClose : _ref$type,
    children = _ref.children,
    onBack = _ref.onBack,
    onClose = _ref.onClose;
  return /*#__PURE__*/React.createElement("div", {
    className: "pisell-lowcode__eft-pay-header",
    style: type === EPopupTitleBarVariantType.LeftTitleClose ? {
      justifyContent: 'space-between'
    } : type === EPopupTitleBarVariantType.BackTitleClose ? {
      justifyContent: 'space-between'
    } : {}
  }, type === EPopupTitleBarVariantType.BackTitleClose ? /*#__PURE__*/React.createElement(LeftOutlined, {
    style: {
      fontSize: '24px'
    },
    onClick: onBack
  }) : null, /*#__PURE__*/React.createElement("div", {
    className: "pisell-lowcode__eft-pay-header-title"
  }, children), /*#__PURE__*/React.createElement(XClose, {
    size: 20,
    style: {
      fontSize: '24px'
    },
    onClick: onClose
  }));
});