import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import CollapsibleList from "../Packages/components/collapsibleList/index.js";
import { renderBundles } from "../Packages/components/collapsibleList/utils.js";
import React from "react";
import { locales } from "@pisell/utils";
import "./index.less";
//#region src/components/productCard/components/Sales/index.tsx
const prefix = "pisell-lowcode-";
const Sales = ({ item, isShowNote }) => {
	let other_products = (item === null || item === void 0 ? void 0 : item.relation_products) || [];
	other_products = other_products.map((p) => {
		return _objectSpread2(_objectSpread2({}, p), {}, {
			title: p === null || p === void 0 ? void 0 : p.product_title,
			price: p === null || p === void 0 ? void 0 : p.selling_price,
			symbol: item.symbol,
			num: p === null || p === void 0 ? void 0 : p.product_quantity,
			total: p === null || p === void 0 ? void 0 : p.selling_price
		});
	});
	return (other_products === null || other_products === void 0 ? void 0 : other_products.length) > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${prefix}product-sales-wrap` }, /* @__PURE__ */ React.createElement("div", { className: `${prefix}product-sales-title` }, locales.getText("pisell2.product.card.sales")), /* @__PURE__ */ React.createElement(CollapsibleList, {
		list: other_products || [],
		renderItem: (items) => renderBundles(items, true, isShowNote)
	}))) : null;
};
//#endregion
export { Sales as default };
