import React from "react";
import { image } from "@pisell/utils";
import classNames from "classnames";
import XClose from "@pisell/icon/es/XClose";
import "./index.less";
//#region src/components/productExtension/fields/SelectProducts/ProductItemPreview/index.tsx
const ProductItemPreview = ({ item = {}, onClick, onRemove, amountSymbol = "$", style, className }) => {
	return /* @__PURE__ */ React.createElement("div", {
		style,
		className: classNames("product-item-card-preview", className),
		onClick: () => {
			onClick(item);
		}
	}, item.cover ? /* @__PURE__ */ React.createElement("img", {
		src: image.ali(item.cover, 100),
		className: "product-item-card-preview-cover"
	}) : null, /* @__PURE__ */ React.createElement("div", { className: "product-item-card-preview-content" }, /* @__PURE__ */ React.createElement("div", { className: "product-item-card-preview-title" }, item.title)), /* @__PURE__ */ React.createElement("div", {
		className: "product-item-card-preview-close-wrap",
		onClick: (e) => {
			e.preventDefault();
			e.stopPropagation();
			onRemove === null || onRemove === void 0 || onRemove(item);
		}
	}, /* @__PURE__ */ React.createElement(XClose, { className: "product-item-card-preview-close" })));
};
//#endregion
export { ProductItemPreview as default };
