import "choerodon-ui/pro/lib/button/style";
import _Button from "choerodon-ui/pro/lib/button";
import React from 'react';
import { withRouter } from 'react-router-dom';
import "./index.less";
var EmptyPage = withRouter(function (props) {
  var history = props.history,
      search = props.location.search,
      pathname = props.pathname,
      access = props.access,
      title = props.title,
      describe = props.describe,
      btnText = props.btnText,
      onClick = props.onClick;

  function handleClick() {
    history.push({
      pathname: pathname,
      search: search
    });
  }

  return /*#__PURE__*/React.createElement("div", {
    className: "c7ncd-empty-page-wrap"
  }, /*#__PURE__*/React.createElement("div", {
    className: "c7ncd-empty-page"
  }, /*#__PURE__*/React.createElement("div", {
    className: "c7ncd-empty-page-image c7ncd-empty-page-image-".concat(access ? 'owner' : 'member')
  }), /*#__PURE__*/React.createElement("div", {
    className: "c7ncd-empty-page-text"
  }, /*#__PURE__*/React.createElement("div", {
    className: "c7ncd-empty-page-title"
  }, title), /*#__PURE__*/React.createElement("div", {
    className: "c7ncd-empty-page-des"
  }, describe), access && btnText && /*#__PURE__*/React.createElement(_Button, {
    color: "primary",
    onClick: onClick || handleClick,
    funcType: "raised"
  }, btnText))));
});
EmptyPage.defaultProps = {
  pathname: '',
  access: false,
  btnText: ''
};
export default EmptyPage;