var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
import React from 'react';
import { ResponsiveLayout } from './ResponsiveLayout.js';
export function responsiveLayout(WrappedComp) {
    var ComponentWithLayout = /** @class */ (function (_super) {
        __extends(class_1, _super);
        function class_1() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.renderWithLayout = function (currentLayout) {
                _this.layout = currentLayout;
                return _super.prototype.render.call(_this);
            };
            return _this;
        }
        Object.defineProperty(class_1.prototype, "currentLayout", {
            get: function () {
                return this.layout;
            },
            set: function (value) {
                //
            },
            enumerable: false,
            configurable: true
        });
        Object.defineProperty(class_1.prototype, "isMobileLayout", {
            get: function () {
                return this.layout.isMobile;
            },
            set: function (value) {
                //
            },
            enumerable: false,
            configurable: true
        });
        class_1.prototype.render = function () {
            return React.createElement(ResponsiveLayout, null, this.renderWithLayout);
        };
        return class_1;
    }(WrappedComp));
    var nameDescriptor = Object.getOwnPropertyDescriptor(ComponentWithLayout, 'name');
    if (!nameDescriptor || nameDescriptor.configurable) {
        Object.defineProperty(ComponentWithLayout, 'name', { value: WrappedComp.name });
    }
    return ComponentWithLayout;
}
//# sourceMappingURL=decorator.js.map