import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import CollapsibleList from "../../../components/Packages/components/collapsibleList/index.js";
import BasicInfo from "../basicInfo/index.js";
import { PREFIX } from "../../index.js";
import React from "react";
import { locales } from "@pisell/utils";
import { Divider } from "antd";
import "./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 _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.createElement(React.Fragment, null, hideDivider ? null : /* @__PURE__ */ React.createElement(Divider, { style: { margin: 0 } }), /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}_sales-wrap` }, /* @__PURE__ */ React.createElement("div", { className: `sales-title` }, locales.getText("pisell2.cart.sku-card.sales.title")), /* @__PURE__ */ React.createElement(CollapsibleList, {
		list: other_products || [],
		renderItem: (item) => {
			return /* @__PURE__ */ React.createElement(BasicInfo, {
				isShowImage,
				style: {
					border: "1px solid #D0D5DD",
					borderRadius: 4,
					padding: 4
				},
				dataSource: _objectSpread2({}, item)
			});
		}
	}))) : null;
};
//#endregion
export { Sales as default };
