"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _classnames = _interopRequireDefault(require("classnames"));
var _marked = require("marked");
var _constants = require("../../constants");
var _jsxRuntime = require("react/jsx-runtime");
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.

/* eslint-disable react/no-danger */

/**
 * `Markdown` component is used for creating content with rich text formatting.
 * @since 0.0.42
 */
const Markdown = _ref => {
  let {
    baseClassName = `${_constants.CLS_PREFIX}markdown`,
    className,
    compact = false,
    children,
    ...props
  } = _ref;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
    className: (0, _classnames.default)(baseClassName, {
      [`${baseClassName}--compact`]: compact
    }, className),
    dangerouslySetInnerHTML: {
      __html: (0, _marked.marked)(children)
    },
    ...props
  });
};
var _default = exports.default = Markdown;