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/pisellAppCard/PisellAppCard.tsx
var PisellAppCard_exports = {};
__export(PisellAppCard_exports, {
  default: () => PisellAppCard_default
});
module.exports = __toCommonJS(PisellAppCard_exports);
var import_react = __toESM(require("react"));
var import_antd = require("antd");
var import_classnames = __toESM(require("classnames"));
var import_pisellTags = __toESM(require("../pisellTags"));
var import_pisellCard = __toESM(require("../pisellCard"));
var import_pisellAvatar = __toESM(require("../pisellAvatar"));
var import_PisellAppCard = require("./PisellAppCard.less");
var import_icon = __toESM(require("../icon"));
var PisellAppCard = ({
  className,
  style,
  avatar,
  tags,
  title,
  description,
  bottomButtons,
  moreActions,
  icon
}) => {
  return /* @__PURE__ */ import_react.default.createElement(
    import_pisellCard.default,
    {
      className: (0, import_classnames.default)("pisell-lowcode-app-card", className),
      style
    },
    /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-app-card-header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-app-card-header-left" }, (avatar || icon) && /* @__PURE__ */ import_react.default.createElement(
      import_pisellAvatar.default,
      {
        icon: icon && /* @__PURE__ */ import_react.default.createElement(import_icon.default, { type: icon }),
        src: avatar || void 0,
        alt: title,
        size: "xl",
        shape: "square",
        style: { border: "none" },
        borderRadius: 10
      }
    )), /* @__PURE__ */ import_react.default.createElement("div", null, moreActions && moreActions.length > 0 && /* @__PURE__ */ import_react.default.createElement(
      import_antd.Dropdown,
      {
        menu: {
          items: moreActions.map((action, index) => ({
            key: index,
            label: action.label,
            onClick: action.onClick
          }))
        },
        placement: "bottomRight",
        trigger: ["click"]
      },
      /* @__PURE__ */ import_react.default.createElement(
        import_antd.Button,
        {
          icon: /* @__PURE__ */ import_react.default.createElement(import_icon.default, { type: "pisell2-dots-vertical" }),
          size: "large"
        }
      )
    ))),
    /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-app-card-content" }, tags && tags.length > 0 && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-app-card-content-tags" }, tags.map((tag, index) => /* @__PURE__ */ import_react.default.createElement(import_pisellTags.default, { key: index, type: tag.type, color: tag.color }, tag.label))), /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-app-card-content-title" }, title), description && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-app-card-content-description" }, description))),
    bottomButtons && bottomButtons.length > 0 && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-app-card-footer" }, bottomButtons.map(
      (button, index) => !button.hidden && /* @__PURE__ */ import_react.default.createElement(
        import_antd.Button,
        {
          type: button.type,
          onClick: button.onClick,
          key: index,
          size: "large"
        },
        button.label
      )
    ))
  );
};
var PisellAppCard_default = PisellAppCard;
