import React__default, { useState, useEffect } from 'react';

function withSsrSafe(Component) {
    const Wrapped = (props)=>{
        const [mounted, setMounted] = useState(false);
        useEffect(()=>{
            setMounted(true);
        }, []);
        return mounted ? /*#__PURE__*/ React__default.createElement(Component, props) : null;
    };
    Wrapped.displayName = Component.displayName ? `SsrSafe(${Component.displayName})` : 'SsrSafe';
    return Wrapped;
}

export { withSsrSafe };
//# sourceMappingURL=withSsrSafe.mjs.map
