// Copyright 1999-2023. Plesk International GmbH. All rights reserved.

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

import classNames from 'classnames';
import { marked } from 'marked';
import { CLS_PREFIX } from '../../constants';
import { jsx as _jsx } from "react/jsx-runtime";
/**
 * `Markdown` component is used for creating content with rich text formatting.
 * @since 0.0.42
 */
const Markdown = _ref => {
  let {
    baseClassName = `${CLS_PREFIX}markdown`,
    className,
    compact = false,
    children,
    ...props
  } = _ref;
  return /*#__PURE__*/_jsx("div", {
    className: classNames(baseClassName, {
      [`${baseClassName}--compact`]: compact
    }, className),
    dangerouslySetInnerHTML: {
      __html: marked(children)
    },
    ...props
  });
};
export default Markdown;