import React from 'react';
function formatJson(value) {
  try {
    return JSON.stringify(value, null, 2);
  } catch (_unused) {
    return String(value);
  }
}

/**
 * 原始数据快照面板：四列 JSON 展示 tempOrder / customer / cart.items / products。
 */
export var RawSnapshotPanel = function RawSnapshotPanel(_ref) {
  var sales = _ref.sales,
    cart = _ref.cart,
    customer = _ref.customer,
    summary = _ref.summary,
    products = _ref.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: products
  })), /*#__PURE__*/React.createElement("pre", null, formatJson({
    summary: summary
  }))));
};