/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import "./index.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
import Markdown from 'markdown-to-jsx';
import { fg } from '@atlaskit/platform-feature-flags';
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
import UList from './ulist';
var baseStyle = null;
var textStyleNew = null;
var textStyleOld = null;

/**
 * A component to render a response from AI in markdown text.
 * @internal
 * @param {AISummaryProps} AISummaryProps
 */
var AISummary = function AISummary(_ref) {
  var _ref$content = _ref.content,
    content = _ref$content === void 0 ? '' : _ref$content,
    className = _ref.className,
    _ref$testId = _ref.testId,
    testId = _ref$testId === void 0 ? 'ai-summary' : _ref$testId,
    _ref$minHeight = _ref.minHeight,
    minHeight = _ref$minHeight === void 0 ? 0 : _ref$minHeight;
  if (!content && minHeight === 0) {
    return null;
  }
  return /*#__PURE__*/React.createElement(Markdown, {
    "data-testid": testId
    // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
    ,
    className: ax(["_11c8wadc _slp31hna _1nmz1hna _o5724jg8 _181u1kdv _1rkw1kdv _te171kdv _uizt1kdv", expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true) && fg('platform_sl_3p_auth_rovo_action_kill_switch') ? "_syazi7uo" : "_syazazsu", className]),
    children: content,
    options: _objectSpread({
      forceWrapper: true,
      overrides: {
        ul: UList
      }
    }, fg('navx-vuln-1914676-fix-xss-in-ai-summaries') ? {
      disableParsingRawHTML: true
    } : {}),
    style: {
      minHeight: minHeight
    }
  });
};
export default AISummary;