import ImageRegistry from '@splunk/visualization-context/ImageRegistry'; export interface DownloadProgress { bytesDownloaded: number; contentLength?: number; message: string; } export interface IDownloader { downloadWithProgress(url: string, complete: (svg: string) => void, progress?: (p: DownloadProgress) => void, error?: (msg: string, error?: Error) => void): void | Promise; } export declare const b64DecodeUnicode: (base64Data: string) => string; export declare class ImageRegistryFetcher implements IDownloader { context: ImageRegistry; constructor(context?: ImageRegistry); downloadWithProgress(url: string, complete: (svg: string) => void, progress?: (p: DownloadProgress) => void, error?: (msg: string, error?: Error) => void): Promise; } export declare class URLDownloader implements IDownloader { downloadWithProgress(url: string, complete: (svg: string) => void, progress?: (p: DownloadProgress) => void, error?: (msg: string, error?: Error) => void): void; } export default class Downloader { private downloaders; constructor(downloaders: { [protocol: string]: IDownloader; }); downloadWithProgress(url: string, complete: (svg: string) => void, progress?: (p: DownloadProgress) => void, error?: (msg: string, error?: Error) => void): void; }