import { useStore as a } from "../use-store.js";
import { useIsoMorphicEffect as c } from "../use-iso-morphic-effect.js";
import { overflows as t } from "./overflow-store.js";
function p(r, o, f = () => ({ containers: [] })) {
  let e = a(t), s = o ? e.get(o) : void 0, i = s ? s.count > 0 : !1;
  return c(() => {
    if (!(!o || !r)) return t.dispatch("PUSH", o, f), () => t.dispatch("POP", o, f);
  }, [r, o]), i;
}
export {
  p as useDocumentOverflowLockedEffect
};
