import { o as r } from "./rolldown-runtime.js";
import { i as n } from "./vendor/react.js";
import { u as c } from "./useRenderElement.js";
var o = /* @__PURE__ */ r(n()), a = o[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0, -3)], f = a && a !== o.useLayoutEffect ? a : (e) => e();
function p(e) {
  const t = c(s).current;
  return t.next = e, f(t.effect), t.trampoline;
}
function s() {
  const e = {
    next: void 0,
    callback: u,
    trampoline: (...t) => e.callback?.(...t),
    effect: () => {
      e.callback = e.next;
    }
  };
  return e;
}
function u() {
}
var i = () => {
}, d = typeof document < "u" ? o.useLayoutEffect : i;
export {
  p as n,
  d as t
};

//# sourceMappingURL=useIsoLayoutEffect.js.map