/** * Configuration for batch image fetching */ export interface BatchImageFetchConfig { /** 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 batch image fetching * Call this once in your app initialization (e.g., _app.tsx or layout.tsx) * * @example * ```typescript * // In app initialization * configureBatchImageFetch({ * tenantHostUrl: process.env.NEXT_PUBLIC_TENANT_HOST_URL || '', * enableDevMode: process.env.NEXT_PUBLIC_ENABLE_DEV_TICKET_OBSERVER === 'true' * }) * ``` */ export declare function configureBatchImageFetch(config: BatchImageFetchConfig): void; /** * Fetch multiple images with authentication in batch * Returns a map of original imageUrl to fetched blob URL * * @param imageUrls - Array of image URLs to fetch * @param config - Optional configuration override for this batch * @returns Promise resolving to map of original URL → blob URL * * @example * ```typescript * const images = await batchFetchAuthenticatedImages([ * '/api/organizations/123/image', * '/api/organizations/456/image' * ]) * // { '/api/organizations/123/image': 'blob:...', '/api/organizations/456/image': 'blob:...' } * ``` */ export declare function batchFetchAuthenticatedImages(imageUrls: string[], config?: BatchImageFetchConfig): Promise>; /** * React hook to batch fetch images with authentication * * Features: * - Automatically deduplicates URLs * - Caches fetched results * - Only fetches new/unfetched URLs * - Cleans up blob URLs on unmount * * @param imageUrls - Array of image URLs (can include null/undefined) * @param config - Optional configuration override * @returns Map of original URL → fetched blob URL * * @example * ```typescript * // In a component * const imageUrls = useMemo(() => * organizations.map(org => org.imageUrl).filter(Boolean), * [organizations] * ) * const fetchedImages = useBatchImages(imageUrls) * * // Use in render * {org.name} * ``` */ export declare function useBatchImages(imageUrls: (string | null | undefined)[], config?: BatchImageFetchConfig): Record; //# sourceMappingURL=use-batch-images.d.ts.map