import { __assign } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import ErrorBoundary from './ErrorBoundary';
export function withErrorBoundary(_a) {
    var _b = _a === void 0 ? {} : _a, BaseComponent = _b.Component, FallbackComponent = _b.FallbackComponent, onError = _b.onError;
    var ErrorBoundaryInner = function (props) { return (_jsx(ErrorBoundary, __assign({ FallbackComponent: FallbackComponent, onError: onError }, { children: _jsx(BaseComponent, __assign({}, props), void 0) }), void 0)); };
    return ErrorBoundaryInner;
}
export default withErrorBoundary;
