/**
 * Block API React Context
 *
 * Provider and hook for accessing the Block API Client in React components.
 */
import React from 'react';
import { type BlockApiClient } from './client';
import type { BlockApiConfig } from './types';
declare global {
    var __RIVERBANK_BLOCK_API_CONTEXT__: React.Context<BlockApiClient | null> | undefined;
}
export interface BlockApiProviderProps {
    /**
     * Pre-created client instance.
     * Use this when you want to share a client across multiple renders.
     */
    client?: BlockApiClient;
    /**
     * Configuration to create a new client.
     * If provided without `client`, a new client will be created.
     */
    config?: BlockApiConfig;
    children: React.ReactNode;
}
/**
 * Provider for Block API Client
 *
 * Can be initialized with either a pre-created client or a config object.
 * If config is provided, a new client is created and memoized.
 *
 * @example
 * ```tsx
 * // With config (creates client)
 * <BlockApiProvider config={{ baseUrl, auth, siteId }}>
 *   <App />
 * </BlockApiProvider>
 *
 * // With pre-created client
 * const client = createBlockApi({ baseUrl, auth, siteId });
 * <BlockApiProvider client={client}>
 *   <App />
 * </BlockApiProvider>
 * ```
 */
export declare function BlockApiProvider({ client, config, children, }: BlockApiProviderProps): React.ReactElement;
/**
 * Hook to access the Block API Client
 *
 * Must be used within a BlockApiProvider.
 *
 * @example
 * ```tsx
 * function EventsList() {
 *   const api = useBlockApi();
 *   const [events, setEvents] = useState([]);
 *
 *   useEffect(() => {
 *     api.getPublicEvents({ from, to }).then(res => setEvents(res.data));
 *   }, [api]);
 *
 *   return <ul>{events.map(e => <li key={e.id}>{e.title}</li>)}</ul>;
 * }
 * ```
 */
export declare function useBlockApi(): BlockApiClient;
/**
 * Hook to optionally access the Block API Client
 *
 * Returns null if not within a BlockApiProvider.
 * Useful for components that can work with or without the API client.
 */
export declare function useBlockApiOptional(): BlockApiClient | null;
