import { createContext, useContext } from "react";
//#region ../core/src/pay-api-context.ts
const PayApiContext = createContext(null);
const PayApiProvider = PayApiContext.Provider;
function usePayApi() {
	const api = useContext(PayApiContext);
	if (!api) throw new Error("usePayApi must be used within a PayApiProvider");
	return api;
}
//#endregion
//#region ../../platform/address-autocomplete/src/api-context.ts
const AddressAutocompleteApiContext = createContext(null);
const AddressAutocompleteApiProvider = AddressAutocompleteApiContext.Provider;
function useAddressAutocompleteApi() {
	const api = useContext(AddressAutocompleteApiContext);
	if (!api) throw new Error("useAddressAutocompleteApi must be used within an AddressAutocompleteApiProvider");
	return api;
}
//#endregion
export { usePayApi as i, useAddressAutocompleteApi as n, PayApiProvider as r, AddressAutocompleteApiProvider as t };

//# sourceMappingURL=api-context-3GmfqvIB.mjs.map