/** * API Provider Component for React/Next.js * Initializes the API client service with environment configuration and event handlers * * @module frontend/providers/ApiProvider */ import { type ReactElement } from 'react'; import type { CoreApiProviderProps } from '@plyaz/types/core'; /** * API Provider Component * IMPORTANT: For client components, pass sensitive config from server-side props/actions * Initializes the API client service for React/Next.js applications * * @example * ```tsx * // In your app layout or _app.tsx * import { ApiProvider } from '@plyaz/core'; * * export default function RootLayout({ children }) { * const envConfig = { * env: process.env.NODE_ENV as 'production', * apiKey: process.env.API_KEY, * }; * * const apiConfig = { * baseURL: process.env.API_URL!, * clientEvents: { * onRequestStart: (event) => console.log('Request started:', event), * }, * }; * * return ( * * {children} * * ); * } * ``` */ export declare function ApiProvider({ children, envConfig, apiConfig, loadingComponent, errorComponent, onInitialized, onError, }: CoreApiProviderProps): ReactElement; //# sourceMappingURL=ApiProvider.d.ts.map