"use client";
import {
  ChatRuntimeContext,
  useChatRuntime,
  useRequiredChatRuntime
} from "../chunk-ZG2YY5E7.js";
import {
  EndpointsRuntimeContext,
  useEndpointsRuntime,
  useRequiredEndpointsRuntime
} from "../chunk-MJNXIEV2.js";
import "../chunk-GGWZFCYS.js";

// src/contexts/use-outer-or-default.ts
import { useContext, useMemo } from "react";
function useOuterOrDefault(context, factory, deps = []) {
  const outer = useContext(context);
  const fallback = useMemo(factory, deps);
  return outer ?? fallback;
}
export {
  ChatRuntimeContext,
  EndpointsRuntimeContext,
  useChatRuntime,
  useEndpointsRuntime,
  useOuterOrDefault,
  useRequiredChatRuntime,
  useRequiredEndpointsRuntime
};
//# sourceMappingURL=index.js.map