Liferay.Loader.define("portal-search-ranking-web@2.0.50/js/utils/FormValueDebugger.es", ['module', 'exports', 'require', 'frontend-js-react-web$react'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = void 0;

    var _react = _interopRequireDefault(require("frontend-js-react-web$react"));

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * The contents of this file are subject to the terms of the Liferay Enterprise
     * Subscription License ("License"). You may not use this file except in
     * compliance with the License. You can obtain a copy of the License by
     * contacting Liferay, Inc. See the License for the specific language governing
     * permissions and limitations under the License, including but not limited to
     * distribution rights of the Software.
     */
    var PrettyPrintArray = function PrettyPrintArray(_ref) {
      var value = _ref.value;
      return (/*#__PURE__*/_react.default.createElement("span", null, '[', value.map(function (item, i) {
          return (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
              key: i
            }, /*#__PURE__*/_react.default.createElement("span", {
              className: "badge badge-pill badge-secondary"
            }, item), i + 1 !== value.length && ', ')
          );
        }), ']')
      );
    };
    /**
     * Used for displaying hidden values for easier debugging. This component
     * should only be used during development.
     */

    var FormValueDebugger = function FormValueDebugger(_ref2) {
      var values = _ref2.values;
      return (/*#__PURE__*/_react.default.createElement("div", {
          className: "alert alert-dark",
          style: {
            margin: '0 auto',
            maxWidth: '1000px'
          }
        }, /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("strong", null, 'Form hidden values for debugging'), ' (Only the values from the frontend component. There are others defined in the JSP)'), /*#__PURE__*/_react.default.createElement("table", {
          className: "table table-bordered table-striped"
        }, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, 'Name'), /*#__PURE__*/_react.default.createElement("th", null, 'Value'))), /*#__PURE__*/_react.default.createElement("tbody", null, values.map(function (_ref3) {
          var name = _ref3.name,
              value = _ref3.value;
          return (/*#__PURE__*/_react.default.createElement("tr", {
              key: name
            }, /*#__PURE__*/_react.default.createElement("td", null, name), /*#__PURE__*/_react.default.createElement("td", null, Array.isArray(value) ? /*#__PURE__*/_react.default.createElement(PrettyPrintArray, {
              value: value
            }) : value))
          );
        }))))
      );
    };

    var _default = FormValueDebugger;
    exports.default = _default;
    //# sourceMappingURL=FormValueDebugger.es.js.map
  }
});
//# sourceMappingURL=FormValueDebugger.es.js.map