import { createContext, useContext } from "react";
//#region src/providers/PortalTenantClientProvider.tsx
const PortalTenantClientContext = createContext(null);
const PortalTenantClientProvider = PortalTenantClientContext.Provider;
/**
* Returns the portal-tenant FetchClient from context.
* Must be used within a FluidProvider.
*/
function usePortalTenantClient() {
	const client = useContext(PortalTenantClientContext);
	if (!client) throw new Error("usePortalTenantClient must be used within a FluidProvider");
	return client;
}
//#endregion
export { usePortalTenantClient as n, PortalTenantClientProvider as t };

//# sourceMappingURL=PortalTenantClientProvider-BF-1Fy27.mjs.map