/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
import "./index.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
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;
  }
  var is3pExperimentEnabled =
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
  fg('platform_sl_3p_auth_rovo_action_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true) ||
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
  fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
  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", is3pExperimentEnabled ? "_syazi7uo" : "_syazazsu", className]),
    children: content,
    options: {
      forceWrapper: true,
      overrides: {
        ul: UList
      },
      disableParsingRawHTML: true
    },
    style: {
      minHeight: minHeight
    }
  });
};
export default AISummary;