import * as c from "react";
import { s as i } from "../../../../../../../../_virtual/index6.js";
import { w as S } from "../../../../../../../../_virtual/with-selector.js";
import { isReactVersionAtLeast as a } from "../reactVersion.js";
const u = a(19), m = u ? p : l;
function b(t, e, o, r, n) {
  return m(t, e, o, r, n);
}
function p(t, e, o, r, n) {
  const s = c.useCallback(() => e(t.getSnapshot(), o, r, n), [t, e, o, r, n]);
  return i.useSyncExternalStore(t.subscribe, s, s);
}
function l(t, e, o, r, n) {
  return S.useSyncExternalStoreWithSelector(t.subscribe, t.getSnapshot, t.getSnapshot, (s) => e(s, o, r, n));
}
export {
  b as useStore
};
