import {
  __name
} from "./chunk-PAWJFY3S.mjs";

// src/client/context/JsonApiContext.ts
import { createContext, useContext } from "react";
var JsonApiContext = createContext(null);
function useJsonApiConfig() {
  const config = useContext(JsonApiContext);
  if (!config) {
    throw new Error("useJsonApiConfig must be used within a JsonApiProvider");
  }
  return config;
}
__name(useJsonApiConfig, "useJsonApiConfig");
function useJsonApiConfigOptional() {
  return useContext(JsonApiContext);
}
__name(useJsonApiConfigOptional, "useJsonApiConfigOptional");

export {
  JsonApiContext,
  useJsonApiConfig,
  useJsonApiConfigOptional
};
//# sourceMappingURL=chunk-VOXD3ZLY.mjs.map