import * as t from "react";
import { env as n } from "../utils/env.js";
function o() {
  let f = typeof document > "u";
  return "useSyncExternalStore" in t ? ((e) => e.useSyncExternalStore)(t)(() => () => {
  }, () => !1, () => !f) : !1;
}
function a() {
  let f = o(), [e, r] = t.useState(n.isHandoffComplete);
  return e && n.isHandoffComplete === !1 && r(!1), t.useEffect(() => {
    e !== !0 && r(!0);
  }, [e]), t.useEffect(() => n.handoff(), []), f ? !1 : e;
}
export {
  a as useServerHandoffComplete
};
