import React from 'react';
import { withWrap } from "../../utils/hoc";
import { Card, Flex } from 'antd';
import classNames from 'classnames';
import "./index.less";
var CardPro = function CardPro(props) {
  var headTitle = props.headTitle,
    headSubTitle = props.headSubTitle,
    _props$isShowFooter = props.isShowFooter,
    isShowFooter = _props$isShowFooter === void 0 ? true : _props$isShowFooter,
    contentHeight = props.contentHeight,
    children = props.children,
    _props$actionButtons = props.actionButtons,
    actionButtons = _props$actionButtons === void 0 ? [] : _props$actionButtons,
    _props$buttonPosition = props.buttonPosition,
    buttonPosition = _props$buttonPosition === void 0 ? 'center' : _props$buttonPosition,
    cover = props.cover,
    extra = props.extra,
    isShowHead = props.isShowHead,
    className = props.className,
    coverHeight = props.coverHeight,
    badge = props.badge;
  return /*#__PURE__*/React.createElement(Card, {
    title: null,
    style: {
      padding: 0
    },
    className: classNames('pisell-cardPro-wrap', className, cover && 'pisell-cardPro-wrap-with-cover')
  }, !!cover && /*#__PURE__*/React.createElement("div", {
    className: classNames('pisell-cardPro-cover'),
    style: {
      height: coverHeight
    }
  }, cover, /*#__PURE__*/React.createElement("div", {
    className: classNames('pisell-cardPro-badge')
  }, badge)), isShowHead && /*#__PURE__*/React.createElement(Flex, {
    className: classNames('pisell-cardPro-head'),
    justify: "space-between"
  }, /*#__PURE__*/React.createElement(Flex, {
    style: {
      flex: 1
    },
    vertical: true,
    gap: "middle"
  }, /*#__PURE__*/React.createElement("div", {
    className: classNames('pisell-cardPro-head-title')
  }, headTitle), /*#__PURE__*/React.createElement("div", {
    className: classNames('pisell-cardPro-head-subTitle')
  }, headSubTitle)), /*#__PURE__*/React.createElement("div", {
    className: classNames('pisell-cardPro-head-extra')
  }, extra)), /*#__PURE__*/React.createElement(Flex, {
    style: {
      height: contentHeight
    },
    className: classNames('pisell-cardPro-content')
  }, children), isShowFooter && /*#__PURE__*/React.createElement(Flex, {
    gap: 20,
    justify: buttonPosition,
    style: {
      marginTop: 20
    }
  }, actionButtons.map(function (item, index) {
    return item.button;
  })));
};
export default withWrap(CardPro);