/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
require("./index.compiled.css");
var React = _interopRequireWildcard(require("react"));
var _runtime = require("@compiled/react/runtime");
var _markdownToJsx = _interopRequireDefault(require("markdown-to-jsx"));
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
var _ulist = _interopRequireDefault(require("./ulist"));
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
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
  (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_action', 'isEnabled', true) ||
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
  (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
  return /*#__PURE__*/React.createElement(_markdownToJsx.default, {
    "data-testid": testId
    // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
    ,
    className: (0, _runtime.ax)(["_11c8wadc _slp31hna _1nmz1hna _o5724jg8 _181u1kdv _1rkw1kdv _te171kdv _uizt1kdv", is3pExperimentEnabled ? "_syazi7uo" : "_syazazsu", className]),
    children: content,
    options: {
      forceWrapper: true,
      overrides: {
        ul: _ulist.default
      },
      disableParsingRawHTML: true
    },
    style: {
      minHeight: minHeight
    }
  });
};
var _default = exports.default = AISummary;