/* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v0.39.1 */
"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.UnknownMacroPlaceholder = UnknownMacroPlaceholder;
require("./UnknownMacroPlaceholder.compiled.css");
var React = _interopRequireWildcard(require("react"));
var _runtime = require("@compiled/react/runtime");
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _reactIntlNext = require("react-intl-next");
var _messages = require("./messages");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
// Unknown macro placeholder styling aligned with Legacy Content Macro (LCM) for consistent look
var neutralBorder = "var(--ds-background-neutral, #0515240F)";
var unknownMacroContainerStyles = null;

// Match LCM header exactly: lcmHeaderStyles from LegacyContentHeader/index.tsx
var unknownMacroHeaderStyles = null;

// Match LCM content area: white surface, text color inherits
var unknownMacroBodyStyles = null;
var unknownMacroPreStyles = null;
function UnknownMacroPlaceholder(_ref) {
  var _extensionNode$parame, _extensionNode$parame2, _extensionNode$parame3, _extensionNode$parame4;
  var extensionNode = _ref.extensionNode;
  var intl = (0, _reactIntlNext.useIntl)();
  var macroTitle = ((_extensionNode$parame = extensionNode.parameters) === null || _extensionNode$parame === void 0 || (_extensionNode$parame = _extensionNode$parame.macroMetadata) === null || _extensionNode$parame === void 0 ? void 0 : _extensionNode$parame.title) || extensionNode.extensionKey;
  var bodyContent = (_extensionNode$parame2 = extensionNode.parameters) === null || _extensionNode$parame2 === void 0 || (_extensionNode$parame2 = _extensionNode$parame2.macroParams) === null || _extensionNode$parame2 === void 0 || (_extensionNode$parame2 = _extensionNode$parame2.__bodyContent) === null || _extensionNode$parame2 === void 0 ? void 0 : _extensionNode$parame2.value;
  var macroParams = (_extensionNode$parame3 = (_extensionNode$parame4 = extensionNode.parameters) === null || _extensionNode$parame4 === void 0 ? void 0 : _extensionNode$parame4.macroParams) !== null && _extensionNode$parame3 !== void 0 ? _extensionNode$parame3 : {};
  var formatParam = function formatParam(key, param) {
    var _param$value;
    var value = String((_param$value = param === null || param === void 0 ? void 0 : param.value) !== null && _param$value !== void 0 ? _param$value : '').trim();
    return "".concat(key, " = ").concat(value);
  };
  var visibleParams = Object.entries(macroParams).filter(function (_ref2) {
    var _ref3 = (0, _slicedToArray2.default)(_ref2, 1),
      key = _ref3[0];
    return !key.startsWith('_');
  }).map(function (_ref4) {
    var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
      key = _ref5[0],
      param = _ref5[1];
    return formatParam(key, param);
  }).join(' | ');
  var headerText = visibleParams ? "".concat(intl.formatMessage(_messages.messages.unknownMacroHeader, {
    macroTitle: macroTitle
  }), " | ").concat(visibleParams) : intl.formatMessage(_messages.messages.unknownMacroHeader, {
    macroTitle: macroTitle
  });
  return /*#__PURE__*/React.createElement("section", {
    "aria-label": intl.formatMessage(_messages.messages.unknownMacroPlaceholderAriaLabel),
    className: (0, _runtime.ax)(["_19it7tl1 _2rko12b0 _1reo15vq _18m915vq _bfhkrnwa"]),
    style: {
      "--_98ihdp": (0, _runtime.ix)("1px solid ".concat(neutralBorder))
    }
  }, /*#__PURE__*/React.createElement("div", {
    className: (0, _runtime.ax)(["_2rko14xi _11c81a4x _n7zl7tl1 _bfhki8nm _ca0qu2gc _u5f3pxbi _n3td1b66 _19bvpxbi _kqswh2mm _154i1n1a"]),
    style: {
      "--_98ihdp": (0, _runtime.ix)("1px solid ".concat(neutralBorder))
    }
  }, headerText), /*#__PURE__*/React.createElement("div", {
    className: (0, _runtime.ax)(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _bfhkvuon _ca0qutpp _u5f3utpp _n3tdutpp _19bvutpp"])
  }, /*#__PURE__*/React.createElement("pre", {
    className: (0, _runtime.ax)(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _11c8fhey _o5721jtm _1nmz1hna _6z24egat"])
  }, bodyContent)));
}