import { shouldThrowError as s } from "../../../../../../@tanstack_query-core@5.95.2/node_modules/@tanstack/query-core/build/modern/utils.js";
import { useEffect as n } from "../../../../../../preact@10.29.0/node_modules/preact/hooks/dist/hooks.module.js";
var E = (r, e) => {
  (r.suspense || r.throwOnError || r.experimental_prefetchInRender) && (e.isReset() || (r.retryOnMount = !1));
}, d = (r) => {
  n(() => {
    r.clearReset();
  }, [r]);
}, h = ({
  result: r,
  errorResetBoundary: e,
  throwOnError: t,
  query: a,
  suspense: o
}) => r.isError && !e.isReset() && !r.isFetching && a && (o && r.data === void 0 || s(t, [r.error, a]));
export {
  E as ensurePreventErrorBoundaryRetry,
  h as getHasError,
  d as useClearResetErrorBoundary
};
