import React from 'react';
import { Divider } from 'antd';
import classNames from 'classnames';
import "./index.less";
var PageHeader = function PageHeader(props) {
  var title = props.title,
    showTitle = props.showTitle,
    subTitle = props.subTitle,
    showSubTitle = props.showSubTitle,
    showDivider = props.showDivider,
    extra = props.extra,
    className = props.className,
    style = props.style;

  // 如果没有内容需要显示，则返回 null
  if ((!showTitle || !title) && (!showSubTitle || !subTitle) && !extra) {
    return null;
  }
  return /*#__PURE__*/React.createElement("div", {
    className: classNames('pisell-lowcode-page-header-wrap', className),
    style: style
  }, /*#__PURE__*/React.createElement("div", {
    className: 'pisell-lowcode-page-header'
  }, /*#__PURE__*/React.createElement("div", {
    className: 'pisell-lowcode-page-header-left'
  }, showTitle && title && /*#__PURE__*/React.createElement("div", {
    className: 'pisell-lowcode-page-header-title'
  }, title), showSubTitle && subTitle && /*#__PURE__*/React.createElement("div", {
    className: 'pisell-lowcode-page-header-sub-title'
  }, subTitle)), /*#__PURE__*/React.createElement("div", {
    className: 'pisell-lowcode-page-header-extra'
  }, extra)), showDivider && /*#__PURE__*/React.createElement(Divider, {
    className: 'pisell-lowcode-page-header-divider'
  }));
};
export default PageHeader;