var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/cardPro/index.tsx
var cardPro_exports = {};
__export(cardPro_exports, {
  default: () => cardPro_default
});
module.exports = __toCommonJS(cardPro_exports);
var import_react = __toESM(require("react"));
var import_hoc = require("../../utils/hoc");
var import_antd = require("antd");
var import_classnames = __toESM(require("classnames"));
var import_index = require("./index.less");
var CardPro = (props) => {
  const {
    headTitle,
    headSubTitle,
    isShowFooter = true,
    contentHeight,
    children,
    actionButtons = [],
    buttonPosition = "center",
    cover,
    extra,
    isShowHead,
    className,
    coverHeight,
    badge,
    style
  } = props;
  return /* @__PURE__ */ import_react.default.createElement(
    import_antd.Card,
    {
      title: null,
      style: { padding: 0, ...style },
      className: (0, import_classnames.default)(
        "pisell-cardPro-wrap",
        className,
        cover && "pisell-cardPro-wrap-with-cover"
      )
    },
    !!cover && /* @__PURE__ */ import_react.default.createElement(
      "div",
      {
        className: (0, import_classnames.default)("pisell-cardPro-cover"),
        style: { height: coverHeight }
      },
      cover,
      /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-cardPro-badge") }, badge)
    ),
    isShowHead && /* @__PURE__ */ import_react.default.createElement(
      import_antd.Flex,
      {
        className: (0, import_classnames.default)("pisell-cardPro-head"),
        justify: "space-between"
      },
      /* @__PURE__ */ import_react.default.createElement(import_antd.Flex, { style: { flex: 1 }, vertical: true, gap: "middle" }, /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-cardPro-head-title") }, headTitle), /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-cardPro-head-subTitle") }, headSubTitle)),
      /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-cardPro-head-extra") }, extra)
    ),
    /* @__PURE__ */ import_react.default.createElement(
      import_antd.Flex,
      {
        style: { height: contentHeight },
        className: (0, import_classnames.default)("pisell-cardPro-content")
      },
      children
    ),
    isShowFooter && /* @__PURE__ */ import_react.default.createElement(import_antd.Flex, { gap: 20, justify: buttonPosition, style: { marginTop: 20 } }, actionButtons.map((item, index) => {
      return item.button;
    }))
  );
};
var cardPro_default = (0, import_hoc.withWrap)(CardPro);
