import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
var _excluded = ["children"];
import React from 'react';
import { forwardRefAndName } from "../../../lib/forwardRefAndName";
import { Modal } from "../../Modal";
import { ThemeContext } from "../../../lib/theming/ThemeContext";
import { isThemeGTE } from "../../../lib/theming/ThemeHelpers";
import { cx } from "../../../lib/theming/Emotion";
import { MiniModalDataTids } from "../MiniModal";
import { styles } from "../MiniModal.styles";

/**
 * Обёртка над Modal.Body
 *
 * @visibleName MiniModal.Body
 */
export var MiniModalBody = forwardRefAndName('MiniModalBody', function (_ref, ref) {
  var children = _ref.children,
    rest = _objectWithoutPropertiesLoose(_ref, _excluded);
  return /*#__PURE__*/(
    React.createElement(Modal.Body, rest, /*#__PURE__*/
    React.createElement(ThemeContext.Consumer, null, function (theme) {
      var _cx;
      return /*#__PURE__*/(
        React.createElement("div", {
          "data-tid": MiniModalDataTids.description,
          ref: ref,
          className: cx(styles.description(), (_cx = {}, _cx[styles.description5_3(theme)] = isThemeGTE(theme, '5.3'), _cx))
        }, children)
      );
    }))
  );
});