import PisellCard from "../pisellCard/index.js";
import icon_default from "../icon/index.js";
import PisellTags from "../pisellTags/index.js";
import PisellAvatar from "../pisellAvatar/index.js";
import React from "react";
import { Button, Dropdown } from "antd";
import classNames from "classnames";
import "./PisellAppCard.less";
//#region src/components/pisellAppCard/PisellAppCard.tsx
const PisellAppCard = ({ className, style, avatar, tags, title, description, bottomButtons, moreActions, icon }) => {
	return /* @__PURE__ */ React.createElement(PisellCard, {
		className: classNames("pisell-lowcode-app-card", className),
		style
	}, /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode-app-card-header" }, /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode-app-card-header-left" }, (avatar || icon) && /* @__PURE__ */ React.createElement(PisellAvatar, {
		icon: icon && /* @__PURE__ */ React.createElement(icon_default, { type: icon }),
		src: avatar || void 0,
		alt: title,
		size: "xl",
		shape: "square",
		style: { border: "none" },
		borderRadius: 10
	})), /* @__PURE__ */ React.createElement("div", null, moreActions && moreActions.length > 0 && /* @__PURE__ */ React.createElement(Dropdown, {
		menu: { items: moreActions.map((action, index) => ({
			key: index,
			label: action.label,
			onClick: action.onClick
		})) },
		placement: "bottomRight",
		trigger: ["click"]
	}, /* @__PURE__ */ React.createElement(Button, {
		icon: /* @__PURE__ */ React.createElement(icon_default, { type: "pisell2-dots-vertical" }),
		size: "large"
	})))), /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode-app-card-content" }, tags && tags.length > 0 && /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode-app-card-content-tags" }, tags.map((tag, index) => /* @__PURE__ */ React.createElement(PisellTags, {
		key: index,
		type: tag.type,
		color: tag.color
	}, tag.label))), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode-app-card-content-title" }, title), description && /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode-app-card-content-description" }, description))), bottomButtons && bottomButtons.length > 0 && /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode-app-card-footer" }, bottomButtons.map((button, index) => !button.hidden && /* @__PURE__ */ React.createElement(Button, {
		type: button.type,
		onClick: button.onClick,
		key: index,
		size: "large"
	}, button.label))));
};
//#endregion
export { PisellAppCard as default };
