const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
let _pisell_icon_es_XClose = require("@pisell/icon/es/XClose");
_pisell_icon_es_XClose = require_runtime.__toESM(_pisell_icon_es_XClose);
require("./index.less");
//#region src/components/productExtension/fields/SelectProducts/ProductItemPreview/index.tsx
const ProductItemPreview = ({ item = {}, onClick, onRemove, amountSymbol = "$", style, className }) => {
	return /* @__PURE__ */ react.default.createElement("div", {
		style,
		className: (0, classnames.default)("product-item-card-preview", className),
		onClick: () => {
			onClick(item);
		}
	}, item.cover ? /* @__PURE__ */ react.default.createElement("img", {
		src: _pisell_utils.image.ali(item.cover, 100),
		className: "product-item-card-preview-cover"
	}) : null, /* @__PURE__ */ react.default.createElement("div", { className: "product-item-card-preview-content" }, /* @__PURE__ */ react.default.createElement("div", { className: "product-item-card-preview-title" }, item.title)), /* @__PURE__ */ react.default.createElement("div", {
		className: "product-item-card-preview-close-wrap",
		onClick: (e) => {
			e.preventDefault();
			e.stopPropagation();
			onRemove === null || onRemove === void 0 || onRemove(item);
		}
	}, /* @__PURE__ */ react.default.createElement(_pisell_icon_es_XClose.default, { className: "product-item-card-preview-close" })));
};
//#endregion
exports.default = ProductItemPreview;
