import { useCallback, useEffect, useState } from "react";
const useSsrCompat = () => {
  const [mounted, setMounted] = useState(false);
  const [rendered, setRendered] = useState(mounted);
  useEffect(() => {
    setMounted(true);
  }, []);
  useEffect(() => {
    if (mounted) {
      setRendered(true);
    }
  }, [mounted]);
  return [
    useCallback((render) => mounted ? render() : null, [mounted]),
    rendered
  ];
};
var stdin_default = useSsrCompat;
export {
  stdin_default as default
};
