"use client";

// src/contexts/endpoints-runtime-context.tsx
import { createContext, useContext } from "react";
var EndpointsRuntimeContext = createContext(null);
function useEndpointsRuntime() {
  return useContext(EndpointsRuntimeContext);
}
function useRequiredEndpointsRuntime() {
  const v = useContext(EndpointsRuntimeContext);
  if (!v) {
    throw new Error(
      "[endpoints-runtime] hook called outside an <EndpointsRuntimeContext.Provider>. Hub: mount <HubRuntimeProvider> in your providers tree. Embedded app: mount your own provider with proxied URLs at the tree root. Tests/Storybook: wrap render() in <EndpointsRuntimeContext.Provider value={mocked}>."
    );
  }
  return v;
}

export {
  EndpointsRuntimeContext,
  useEndpointsRuntime,
  useRequiredEndpointsRuntime
};
//# sourceMappingURL=chunk-MJNXIEV2.js.map