Liferay.Loader.define("questions-web@1.0.58/js/components/ArticleBodyRenderer.es", ['module', 'exports', 'require', 'questions-web$bbcode-to-react', 'frontend-js-react-web$react', './Highlight.es'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports["default"] = void 0;

    var _bbcodeToReact = _interopRequireDefault(require("questions-web$bbcode-to-react"));

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

    var _Highlight = _interopRequireDefault(require("./Highlight.es"));

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

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * This library is free software; you can redistribute it and/or modify it under
     * the terms of the GNU Lesser General Public License as published by the Free
     * Software Foundation; either version 2.1 of the License, or (at your option)
     * any later version.
     *
     * This library is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
     * details.
     */
    var _default = function _default(_ref) {
      var articleBody = _ref.articleBody,
          _ref$compactMode = _ref.compactMode,
          compactMode = _ref$compactMode === void 0 ? false : _ref$compactMode,
          encodingFormat = _ref.encodingFormat,
          id = _ref.id,
          signature = _ref.signature;
      return _react["default"].createElement(_react["default"].Fragment, null, encodingFormat === 'bbcode' && _react["default"].createElement("p", null, _bbcodeToReact["default"].toReact(articleBody)), encodingFormat !== 'bbcode' && compactMode && _react["default"].createElement("div", {
        className: "questions-article-body-".concat(id),
        dangerouslySetInnerHTML: {
          __html: articleBody
        }
      }), encodingFormat !== 'bbcode' && !compactMode && _react["default"].createElement("div", {
        className: "cke_readonly questions-article-body-".concat(id)
      }, _react["default"].createElement(_Highlight["default"], {
        innerHTML: true
      }, articleBody)), signature && _react["default"].createElement("style", {
        dangerouslySetInnerHTML: {
          __html: ".questions-article-body-".concat(id, " p:last-child:after {content: \" - ").concat(signature, "\"; font-weight: bold;}")
        }
      }));
    };

    exports["default"] = _default;
    //# sourceMappingURL=ArticleBodyRenderer.es.js.map
  }
});
//# sourceMappingURL=ArticleBodyRenderer.es.js.map