import React from "react";
//#region src/plus/salesSdk/demo/components/RawSnapshotPanel.tsx
function formatJson(value) {
	try {
		return JSON.stringify(value, null, 2);
	} catch (_unused) {
		return String(value);
	}
}
/**
* 原始数据快照面板：四列 JSON 展示 tempOrder / customer / cart.items / products。
*/
const RawSnapshotPanel = ({ sales, cart, customer, summary, products }) => {
	return /* @__PURE__ */ React.createElement("section", { className: "sales-sdk-demo__panel" }, /* @__PURE__ */ React.createElement("h3", null, "Raw Snapshot"), /* @__PURE__ */ React.createElement("div", { className: "sales-sdk-demo__raw-grid" }, /* @__PURE__ */ React.createElement("pre", null, formatJson({ selectedCustomer: customer.selected })), /* @__PURE__ */ React.createElement("pre", null, formatJson({ tempOrder: sales.tempOrder })), /* @__PURE__ */ React.createElement("pre", null, formatJson({
		bookings: cart.bookings,
		items: cart.items
	})), /* @__PURE__ */ React.createElement("pre", null, formatJson({ products })), /* @__PURE__ */ React.createElement("pre", null, formatJson({ summary }))));
};
//#endregion
export { RawSnapshotPanel };
