/**
 * Configuration for single image fetching
 * Uses same config as batch image fetching for consistency
 */
export interface AuthenticatedImageConfig {
    /** Base URL for tenant-specific API calls (e.g., 'https://tenant.openframe.dev' or '') */
    tenantHostUrl?: string;
    /** Enable dev mode with Bearer token from localStorage */
    enableDevMode?: boolean;
    /** localStorage key for access token (default: 'of_access_token') */
    accessTokenKey?: string;
}
/**
 * Configure global settings for authenticated image fetching
 * Call this once in your app initialization (e.g., _app.tsx or layout.tsx)
 *
 * Note: This uses the same configuration as useBatchImages. If you've already
 * called configureBatchImageFetch(), you don't need to call this separately.
 *
 * @example
 * ```typescript
 * // In app initialization
 * configureAuthenticatedImage({
 *   tenantHostUrl: process.env.NEXT_PUBLIC_TENANT_HOST_URL || '',
 *   enableDevMode: process.env.NEXT_PUBLIC_ENABLE_DEV_TICKET_OBSERVER === 'true'
 * })
 * ```
 */
export declare function configureAuthenticatedImage(config: AuthenticatedImageConfig): void;
/**
 * React hook to fetch a single image with authentication
 *
 * Features:
 * - Fetches image with cookie authentication
 * - Optional Bearer token in dev mode
 * - Converts to blob URL for img src
 * - Automatic cleanup of blob URLs
 * - Cache-busting with refreshKey
 * - Loading and error states
 * - **Global caching** - Prevents duplicate requests for identical URLs
 * - **Automatic deduplication** - Multiple components using same URL share cached result
 * - **Reference counting** - Cached blobs cleaned up when no longer used
 *
 * @param imageUrl - The image URL to fetch (null/undefined = no fetch)
 * @param refreshKey - Optional key to force re-fetch (e.g., version number, timestamp)
 * @param config - Optional configuration override
 * @returns Object with imageUrl (blob), isLoading, and error
 *
 * @example
 * ```typescript
 * // Basic usage
 * const { imageUrl, isLoading, error } = useAuthenticatedImage(
 *   organization?.imageUrl
 * )
 *
 * // With refresh key (e.g., after upload)
 * const { imageUrl } = useAuthenticatedImage(
 *   organization?.imageUrl,
 *   organization?.imageVersion // Timestamp or version number
 * )
 *
 * // In render
 * {imageUrl && <img src={imageUrl} alt="Organization" />}
 * ```
 */
export declare function useAuthenticatedImage(imageUrl?: string | null, refreshKey?: string | number, config?: AuthenticatedImageConfig): {
    imageUrl: string | undefined;
    isLoading: boolean;
    error: string | null;
};
//# sourceMappingURL=use-authenticated-image.d.ts.map