const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_index = require("../../../iconfont/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
require("./index.less");
//#region src/components/productCard/components/Action/index.tsx
const prefix = "pisell-lowcode-";
const Action = ({ item, onAction }) => {
	const renderIcon = () => {
		const { actionIcon } = item;
		if (actionIcon && typeof actionIcon === "string") return /* @__PURE__ */ react.default.createElement(require_index.default, {
			type: actionIcon,
			style: { fontSize: 20 }
		});
		return null;
	};
	return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)(`${prefix}product-actions`) }, /* @__PURE__ */ react.default.createElement(antd.Button, {
		className: (0, classnames.default)(`${prefix}product-actions-item`),
		size: "large",
		onClick: (e) => {
			e.preventDefault();
			e.stopPropagation();
			onAction();
		}
	}, renderIcon(), item.actionText));
};
//#endregion
exports.default = Action;
