"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.withResponsiveContainer = void 0;
var tslib_1 = require("tslib");
/* eslint-disable @typescript-eslint/no-explicit-any */
var React = require("react");
var ResponsiveContainer_1 = require("./ResponsiveContainer");
/**
 * An HOC to update wrapped component on container resize.
 * {@docCategory ResponsiveContainer}
 */
function withResponsiveContainer(WrappedComponent) {
    var ComponentWithResponsiveContainer = function (_a) {
        var aspect = _a.aspect, width = _a.width, height = _a.height, minWidth = _a.minWidth, minHeight = _a.minHeight, maxHeight = _a.maxHeight, onResize = _a.onResize, restProps = tslib_1.__rest(_a, ["aspect", "width", "height", "minWidth", "minHeight", "maxHeight", "onResize"]);
        return (React.createElement(ResponsiveContainer_1.ResponsiveContainer, { aspect: aspect, width: width, height: height, minWidth: minWidth, minHeight: minHeight, maxHeight: maxHeight, onResize: onResize },
            React.createElement(WrappedComponent, tslib_1.__assign({}, restProps))));
    };
    return ComponentWithResponsiveContainer;
}
exports.withResponsiveContainer = withResponsiveContainer;
//# sourceMappingURL=withResponsiveContainer.js.map