const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_utils = require("../../../components/booking/info/service2/utils.js");
const require_useSelectPet = require("../../../components/booking/info/service2/hooks/useSelectPet.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_materials = require("@pisell/materials");
//#region src/plus/salesSdk/bookingEditService/SalesSdkBookingList.tsx
/**
* 跨日预约「预约列表」Tab：不依赖 booking miniRedux Context，由 props 注入 state。
*/
const SalesSdkBookingList = ({ items, bookingState }) => {
	const { holderLists } = require_useSelectPet.default(bookingState);
	const productParams = (0, react.useMemo)(() => {
		var _bookingState$isTermi;
		return {
			hideAddBtn: (_bookingState$isTermi = bookingState.isTerminalDayBookingPage) !== null && _bookingState$isTermi !== void 0 ? _bookingState$isTermi : false,
			isShowNote: false,
			isShowPackageNote: false,
			holders: holderLists,
			isEdit: false,
			disabledEdit: true
		};
	}, [bookingState.isTerminalDayBookingPage, holderLists]);
	const formatted = (0, react.useMemo)(() => require_utils.formatProducts(items, bookingState, false), [items, bookingState]);
	if (!formatted.length) return null;
	return /* @__PURE__ */ react.default.createElement("div", { style: {
		display: "flex",
		flexWrap: "wrap",
		gap: 16
	} }, formatted.map((item) => {
		var _item$_id;
		return /* @__PURE__ */ react.default.createElement("div", {
			key: (_item$_id = item._id) !== null && _item$_id !== void 0 ? _item$_id : item.id,
			style: { width: "100%" }
		}, /* @__PURE__ */ react.default.createElement(_pisell_materials.ProductCard, require_objectSpread2._objectSpread2({ dataSource: item }, productParams)));
	}));
};
//#endregion
exports.SalesSdkBookingList = SalesSdkBookingList;
