import { __assign, __rest } from "tslib";
/* eslint-disable @typescript-eslint/no-explicit-any */
import * as React from 'react';
import { ResponsiveContainer } from './ResponsiveContainer';
/**
 * An HOC to update wrapped component on container resize.
 * {@docCategory ResponsiveContainer}
 */
export 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 = __rest(_a, ["aspect", "width", "height", "minWidth", "minHeight", "maxHeight", "onResize"]);
        return (React.createElement(ResponsiveContainer, { aspect: aspect, width: width, height: height, minWidth: minWidth, minHeight: minHeight, maxHeight: maxHeight, onResize: onResize },
            React.createElement(WrappedComponent, __assign({}, restProps))));
    };
    return ComponentWithResponsiveContainer;
}
//# sourceMappingURL=withResponsiveContainer.js.map