const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_index = require("../../../components/Packages/components/collapsibleList/index.js");
const require_index$1 = require("../basicInfo/index.js");
const require_index$2 = require("../../index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
let antd = require("antd");
require("./index.less");
//#region src/components/productCard/cartSkuCard/components/sales/index.tsx
const Sales = ({ hideDivider, dataSource, isShowImage }) => {
	const { relation_products = [], symbol = "$" } = dataSource || {};
	let other_products = relation_products.map((p) => {
		return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, p), {}, {
			name: p === null || p === void 0 ? void 0 : p.product_title,
			price: p === null || p === void 0 ? void 0 : p.payment_price,
			symbol,
			num: p === null || p === void 0 ? void 0 : p.product_quantity,
			total: p === null || p === void 0 ? void 0 : p.payment_price
		});
	});
	return (other_products === null || other_products === void 0 ? void 0 : other_products.length) > 0 ? /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, hideDivider ? null : /* @__PURE__ */ react.default.createElement(antd.Divider, { style: { margin: 0 } }), /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}_sales-wrap` }, /* @__PURE__ */ react.default.createElement("div", { className: `sales-title` }, _pisell_utils.locales.getText("pisell2.cart.sku-card.sales.title")), /* @__PURE__ */ react.default.createElement(require_index.default, {
		list: other_products || [],
		renderItem: (item) => {
			return /* @__PURE__ */ react.default.createElement(require_index$1.default, {
				isShowImage,
				style: {
					border: "1px solid #D0D5DD",
					borderRadius: 4,
					padding: 4
				},
				dataSource: require_objectSpread2._objectSpread2({}, item)
			});
		}
	}))) : null;
};
//#endregion
exports.default = Sales;
