const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_Base = require("../../../../plus/saleDetail/Base.js");
const require_index = require("../../components/FloatButtons/index.js");
const require_index$1 = require("../../components/ProductList/index.js");
const require_index$2 = require("../../components/TimeBar/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_materials = require("@pisell/materials");
//#region src/components/bigSale/templates/Standard/index.tsx
function pickSaleDetailDataSource(dataSource) {
	return {
		sales: dataSource.sales,
		customer: dataSource.customer,
		cart: dataSource.cart,
		summary: dataSource.summary
	};
}
/**
* 标准模板：商品列表与订单详情共同展示。
*/
function StandardBigSaleTemplate({ dataSource, mode, variant, productLoadParams, productDisplayConfig, saleDetailTemplate, saleDetailModuleConfig, orderId, locale }) {
	const [timeBarDrawerOpen, setTimeBarDrawerOpen] = (0, react.useState)(false);
	const isPhone = variant === "phone";
	return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement("section", { className: "pisell-big-sale__product-panel" }, /* @__PURE__ */ react.default.createElement(require_index$1.BigSaleProductList, {
		mode,
		dataSource,
		productLoadParams,
		productDisplayConfig,
		variant
	}), isPhone && /* @__PURE__ */ react.default.createElement(require_index.default, { items: [{
		icon: /* @__PURE__ */ react.default.createElement(_pisell_materials.Iconfont, { type: "pisell2-clock" }),
		key: "time-bar",
		onClick: () => setTimeBarDrawerOpen(true)
	}] })), /* @__PURE__ */ react.default.createElement("section", { className: "pisell-big-sale__sale-detail" }, /* @__PURE__ */ react.default.createElement(require_Base.default, {
		dataSource: pickSaleDetailDataSource(dataSource),
		renderType: "current",
		template: saleDetailTemplate,
		variant,
		mobilePresentation: "bottomSheet",
		moduleConfig: saleDetailModuleConfig
	})), /* @__PURE__ */ react.default.createElement(require_index$2.default, {
		dataSource,
		productLoadParams,
		orderId,
		locale,
		variant,
		mobileDrawerOpen: timeBarDrawerOpen,
		onMobileDrawerClose: () => setTimeBarDrawerOpen(false)
	}));
}
//#endregion
exports.StandardBigSaleTemplate = StandardBigSaleTemplate;
