const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
let react = require("react");
react = require_runtime.__toESM(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.default.createElement("section", { className: "sales-sdk-demo__panel" }, /* @__PURE__ */ react.default.createElement("h3", null, "Raw Snapshot"), /* @__PURE__ */ react.default.createElement("div", { className: "sales-sdk-demo__raw-grid" }, /* @__PURE__ */ react.default.createElement("pre", null, formatJson({ selectedCustomer: customer.selected })), /* @__PURE__ */ react.default.createElement("pre", null, formatJson({ tempOrder: sales.tempOrder })), /* @__PURE__ */ react.default.createElement("pre", null, formatJson({
		bookings: cart.bookings,
		items: cart.items
	})), /* @__PURE__ */ react.default.createElement("pre", null, formatJson({ products })), /* @__PURE__ */ react.default.createElement("pre", null, formatJson({ summary }))));
};
//#endregion
exports.RawSnapshotPanel = RawSnapshotPanel;
