import type { Recurly } from '@recurly/recurly-js'; import { PropsWithChildren } from 'react'; import { RecurlyConfig } from './loadRecurly'; export type RecurlyProviderProps = PropsWithChildren; /** * A provider that: * - loads the Recurly library * - ensures that only a single instance of the library is loaded * - configures the library with the provided public key * - provides the library instance via context */ export declare function RecurlyProvider({ children, ...config }: RecurlyProviderProps): import("react/jsx-runtime").JSX.Element; /** * A hook that returns the Recurly instance from context. * * If used outside of a RecurlyProvider, it will throw an error. * * Within a RecurlyProvider: * - If used on the server, it will return undefined. * - If used on the client, it will initially return undefined and then return * the provided Recurly instance once it is loaded. * * @param options - An object to provide an alternate contextual error message * to use if one tries to use this hook outside of a RecurlyProvider. * * @returns The Recurly instance. */ export declare function useRecurly(options?: { noProviderError?: string; }): Recurly | undefined;