"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.SidePageBodyDataTids = exports.SidePageBody = void 0;var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));var _react = _interopRequireDefault(require("react"));


var _CommonWrapper = require("../../internal/CommonWrapper");
var _ThemeContext = require("../../lib/theming/ThemeContext");
var _decorator = require("../ResponsiveLayout/decorator");
var _Emotion = require("../../lib/theming/Emotion");

var _rootNode = require("../../lib/rootNode");

var _SidePage = require("./SidePage.styles");

var _SidePageContext = require("./SidePageContext");var _class, _SidePageBody;





var SidePageBodyDataTids = exports.SidePageBodyDataTids = {
  root: 'SidePageBody__root'
};
/**
 * Тело для сайдпейджа
 *
 * @visibleName SidePage.Body
 */var


SidePageBody = exports.SidePageBody = (0, _decorator.responsiveLayout)(_class = (0, _rootNode.rootNode)(_class = (_SidePageBody = /*#__PURE__*/function (_React$Component) {function SidePageBody() {var _this;for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {args[_key] = arguments[_key];}_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;_this.




    context = _this.context;return _this;}(0, _inheritsLoose2.default)(SidePageBody, _React$Component);var _proto = SidePageBody.prototype;_proto.




  componentDidUpdate = function componentDidUpdate() {
    this.context.updateLayout();
  };_proto.

  render = function render() {var _this2 = this;
    return /*#__PURE__*/(
      _react.default.createElement(_ThemeContext.ThemeContext.Consumer, null,
      function (theme) {var _cx;
        return /*#__PURE__*/(
          _react.default.createElement(_CommonWrapper.CommonWrapper, (0, _extends2.default)({ rootNodeRef: _this2.setRootNode }, _this2.props), /*#__PURE__*/
          _react.default.createElement("div", {
            "data-tid": SidePageBodyDataTids.root,
            className: (0, _Emotion.cx)(_SidePage.styles.body(theme), (_cx = {}, _cx[_SidePage.styles.mobileBody()] = _this2.isMobileLayout, _cx)) },

          _this2.props.children
          )
          ));

      }
      ));

  };return SidePageBody;}(_react.default.Component), _SidePageBody.__KONTUR_REACT_UI__ = 'SidePageBody', _SidePageBody.displayName = 'SidePageBody', _SidePageBody.contextType = _SidePageContext.SidePageContext, _SidePageBody)) || _class) || _class;