import s from "../../../../../../../_virtual/index14.js";
import { useState as f, useCallback as a } from "react";
import { useIsomorphicLayoutEffect as i } from "./useIsomorphicLayoutEffect.js";
function d(e, c, t) {
  const [o, r] = f(
    () => c(e)
  ), l = a(() => {
    const u = c(e);
    s(o, u) || (r(u), t && t());
  }, [
    o,
    e,
    t
  ]);
  return i(l), [
    o,
    l
  ];
}
export {
  d as useCollector
};
//# sourceMappingURL=useCollector.js.map
