
import { AxiosInstance } from "axios";
import { ReactNode } from "react";
import * as react_jsx_runtime0 from "react/jsx-runtime";

//#region src/providers/contexts/ApiContext.d.ts

/**
 * API Configuration
 *
 * baseUrl: Base URL for all requests
 * apiPrefix: Replaces /api in URLs (for cloud mode sessions)
 * authToken: Bearer token for Authorization header
 * headers: Additional headers
 * timeout: Request timeout in ms
 */
/**
 * API configuration inputs for {@link ApiProvider}.
 */
interface ApiConfig {
  baseUrl: string;
  apiPrefix?: string;
  authToken?: string;
  headers?: Record<string, string>;
  timeout?: number;
}
/**
 * Resolved API context values exposed by {@link useApiConfig}.
 */
interface ApiContextValue {
  apiClient: AxiosInstance;
  apiPrefix: string;
  authToken?: string;
  baseUrl: string;
}
/**
 * Access the API configuration, including the configured axios client.
 *
 * @returns The API context values (client, baseUrl, apiPrefix, authToken).
 * @throws Error if used outside {@link RecceProvider}.
 */
declare function useApiConfig(): ApiContextValue;
/**
 * Non-throwing version of {@link useApiConfig}.
 *
 * @returns The API context values, or null if outside {@link RecceProvider}.
 */
declare function useApiConfigOptional(): ApiContextValue | null;
/**
 * Convenience hook for the configured axios client.
 *
 * @returns AxiosInstance configured with API prefix and auth token.
 * @throws Error if used outside {@link RecceProvider}.
 */
declare function useApiClient(): AxiosInstance;
/**
 * Custom client config that allows passing a pre-configured axios instance
 * along with the API configuration values for context.
 */
/**
 * Custom client configuration for {@link ApiProvider}.
 */
interface CustomClientConfig {
  client: AxiosInstance;
  apiPrefix?: string;
  authToken?: string;
  baseUrl?: string;
}
/**
 * Props for {@link ApiProvider}.
 */
interface ApiProviderProps {
  children: ReactNode;
  config: ApiConfig | CustomClientConfig;
}
/**
 * Provides API configuration and an axios client to the subtree.
 */
declare function ApiProvider({
  children,
  config
}: ApiProviderProps): react_jsx_runtime0.JSX.Element;
//#endregion
//#region src/providers/contexts/RouteConfigContext.d.ts
/**
 * Route Configuration for path prefix customization.
 *
 * This context allows cloud consumers to configure a base path prefix
 * for all navigation within OSS components.
 *
 * Default behavior (OSS):
 * - basePath: "" (uses absolute paths like /query, /checks)
 *
 * Cloud usage example:
 * - basePath: "/oss/abc123" or "/preview/abc123"
 * - Navigation to "/query" becomes "/oss/abc123/query"
 */
/**
 * Route configuration interface
 */
interface RouteConfig {
  /**
   * Base path prefix for navigation.
   * For OSS: "" (empty string, uses absolute paths like /query)
   * For Cloud: "/oss/<sessionId>" or "/preview/<sessionId>"
   */
  basePath: string;
}
/**
 * Context value with path resolution utility
 */
interface RouteConfigContextType extends RouteConfig {
  /**
   * Resolves a path with the base path prefix.
   * @param path - The path to resolve (e.g., "/query")
   * @returns The resolved path (e.g., "/oss/abc123/query")
   */
  resolvePath: (path: string) => string;
}
/**
 * Props for RouteConfigProvider
 */
interface RouteConfigProviderProps extends Partial<RouteConfig> {
  children: ReactNode;
}
/**
 * Provider for route configuration.
 *
 * Wrap your application (or RecceContextProvider) with this provider
 * to configure path prefixes for navigation.
 *
 * @example
 * ```tsx
 * // In cloud application
 * <RouteConfigProvider basePath={`/oss/${sessionId}`}>
 *   <RecceContextProvider>
 *     {children}
 *   </RecceContextProvider>
 * </RouteConfigProvider>
 * ```
 */
declare function RouteConfigProvider({
  children,
  basePath
}: RouteConfigProviderProps): react_jsx_runtime0.JSX.Element;
/**
 * Hook to access route configuration.
 *
 * When used outside RouteConfigProvider, returns default config
 * (for OSS backward compatibility).
 *
 * @returns RouteConfigContextType with basePath and resolvePath function
 *
 * @example
 * ```tsx
 * function MyComponent() {
 *   const { basePath, resolvePath } = useRouteConfig();
 *   const fullPath = resolvePath('/checks');
 *   // In cloud with basePath="/oss/abc123": "/oss/abc123/checks"
 *   // In OSS with basePath="": "/checks"
 * }
 * ```
 */
declare function useRouteConfig(): RouteConfigContextType;
/**
 * Safe hook that returns null if context not available.
 * Useful for components that need to detect if RouteConfigProvider is present.
 */
declare function useRouteConfigSafe(): RouteConfigContextType | null;
//#endregion
export { useRouteConfig as a, useApiClient as c, RouteConfigProviderProps as i, useApiConfig as l, RouteConfigContextType as n, useRouteConfigSafe as o, RouteConfigProvider as r, ApiProvider as s, RouteConfig as t, useApiConfigOptional as u };
//# sourceMappingURL=RouteConfigContext-z8YNimdP.d.ts.map