import { ElementRef, InjectionToken } from '@angular/core'; import * as i0 from "@angular/core"; export type NgxImageCacheConfig = { /** * Image to use as a placeholder while loading the main image * Recommended to use inlined SVG or a base64 encoded image */ loadingPlaceholder?: string; /** * Image to use as a placeholder where images fail to load * Recommended to use inlined SVG or a base64 encoded image */ brokenPlaceholder?: string; }; export declare const NGX_IMAGE_CACHE_CONFIG: InjectionToken; export type NgxImageCacheConfiguration = { /** * Max age to cache an image in milliseconds. * If set to `0` or a negative number, images will never expire. */ maxAge: number; /** * Set to `false` to disable memory caching for the image * If both `cacheInMemory` and `cacheInIndexedDB` are false, * no caching will happen. (You'll still get the loader) */ cacheInMemory: boolean; /** * Set to `false` to disable indexedDB caching for the image * If both `cacheInMemory` and `cacheInIndexedDB` are false, * no caching will happen. (You'll still get the loader) */ cacheInIndexedDB: boolean; }; export declare class NgxImageCacheDirective { private readonly element; private readonly cacheConfig; url: string; configuration: NgxImageCacheConfiguration; private get el(); constructor(element: ElementRef, cacheConfig: NgxImageCacheConfig); ngOnChanges(): void; getCachedImage(): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }