import React, { forwardRef } from 'react';
import { useOverlayScrollbar, } from '../providers/useOverlayScrollbar/useOverlayScrollbar';
const withOverlayScrollbar = (WrappedComponent) => {
    return forwardRef((props, ref) => {
        const [OverlayScrollbarHostElement, OverlayScrollbarContentElement] = useOverlayScrollbar();
        return (React.createElement(WrappedComponent, { ...props, ref: ref, overlayScrollbarProps: {
                OverlayScrollbarHostElement,
                OverlayScrollbarContentElement,
            } }));
    });
};
export { withOverlayScrollbar };
//# sourceMappingURL=withOverlayScrollbar.js.map