import React from 'react';
/**
 * Action 日志卡片：保留原 SalesSdkDemoContent 的 Last Action 风格，
 * 但改为支持多条历史（最新在底部）。step runner 的「单次执行 / 一键执行」可以把
 * 关键节点的反馈塞进这个面板，避免页面上各处散落消息。
 */
export var ActionLog = function ActionLog(_ref) {
  var entries = _ref.entries,
    _ref$title = _ref.title,
    title = _ref$title === void 0 ? 'Action Log' : _ref$title;
  if (!entries.length) return null;
  var last = entries[entries.length - 1];
  return /*#__PURE__*/React.createElement("section", {
    className: "sales-sdk-demo__panel sales-sdk-demo__panel--".concat(last.status)
  }, /*#__PURE__*/React.createElement("h3", null, title), /*#__PURE__*/React.createElement("div", {
    className: "sales-sdk-demo__action-log"
  }, entries.map(function (entry, index) {
    return /*#__PURE__*/React.createElement("pre", {
      key: index,
      className: "sales-sdk-demo__action-entry sales-sdk-demo__action-entry--".concat(entry.status)
    }, entry.message);
  })));
};