import { createContext, use } 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 = use(PortalTenantClientContext);
	if (!client) throw new Error("usePortalTenantClient must be used within a FluidProvider");
	return client;
}
//#endregion
//#region src/account/query-keys.ts
const accountKeys = {
	all: ["portalTenant", "account"],
	detail: (userId) => [...accountKeys.all, userId]
};
const storeKeys = {
	countries: (languageIso) => languageIso ? ["bff-store-countries", languageIso] : ["bff-store-countries"],
	languages: () => ["bff-store-languages"]
};
const payKeys = {
	addresses: {
		all: ["portalTenant", "addresses"],
		list: (userId) => [...payKeys.addresses.all, userId]
	},
	paymentMethods: {
		all: ["portalTenant", "paymentMethods"],
		list: (userId) => [...payKeys.paymentMethods.all, userId]
	},
	pointsLedgers: {
		all: ["portalTenant", "pointsLedgers"],
		list: (userId) => [...payKeys.pointsLedgers.all, userId]
	}
};
//#endregion
export { usePortalTenantClient as a, PortalTenantClientProvider as i, payKeys as n, storeKeys as r, accountKeys as t };

//# sourceMappingURL=query-keys-oPgLh6FY.mjs.map