"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.responsiveLayout = responsiveLayout;var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));var _react = _interopRequireDefault(require("react"));

var _ResponsiveLayout = require("./ResponsiveLayout");


function responsiveLayout(WrappedComp) {
  var ComponentWithLayout = /*#__PURE__*/function (_WrappedComp) {function ComponentWithLayout() {var _this;for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {args[_key] = arguments[_key];}_this = _WrappedComp.call.apply(_WrappedComp, [this].concat(args)) || this;_this.


















      renderWithLayout = function (currentLayout) {
        _this.layout = currentLayout;

        return _WrappedComp.prototype.render.call(_this);
      };return _this;}(0, _inheritsLoose2.default)(ComponentWithLayout, _WrappedComp);var _proto = ComponentWithLayout.prototype;_proto.

    render = function render() {
      return /*#__PURE__*/_react.default.createElement(_ResponsiveLayout.ResponsiveLayout, null, this.renderWithLayout);
    };return (0, _createClass2.default)(ComponentWithLayout, [{ key: "currentLayout", get: function get() {return this.layout;}, set: function set(value) {//
      } }, { key: "isMobileLayout", get: function get() {return this.layout.isMobile;}, set: function set(value) {//
      } }]);}(WrappedComp);
  var nameDescriptor = Object.getOwnPropertyDescriptor(ComponentWithLayout, 'name');

  if (!nameDescriptor || nameDescriptor.configurable) {
    Object.defineProperty(ComponentWithLayout, 'name', { value: WrappedComp.name });
  }

  return ComponentWithLayout;
}