import { Observable } from 'rxjs'; import { HeadService } from '@bespunky/angular-zen/core'; import { UniversalService } from '@bespunky/angular-zen/universal'; import { ScriptLoadOptions } from './script-load-options'; import { LoadOptions } from './load-options'; import { LazyLoadedFile } from './lazy-loaded-file'; import * as i0 from "@angular/core"; /** * Provides methods for lazy loading scripts and styles programatically. * The service keeps track of loaded files to skip reloading unless specified otherwise in the options of `loadScript()` or `loadStyle()`. */ export declare class LazyLoaderService { private head; private universal; /** * Defines the default options when calling the `LazyLoaderService.loadScript()` method. */ private defaultScriptOptions; /** * Defines the default options when calling the `LazyLoaderService.loadStyle()` method. */ private defaultStyleOptions; /** * Keeps track of loaded lazy files status and references */ private cache; constructor(head: HeadService, universal: UniversalService); /** * Checks whether the file from the specified url has already been cached. * @param url The url for the file to check. * @returns A value indicating whether the file from the specified url has already been cached. */ isCached(url: string): boolean; /** * Checks whether a script element is already present in `
` for the given url. * This doesn't guarantee that the script has been loaded. * * @param {string} url The url of the loaded script. * @returns {boolean} `true` if an element matching the url is present in ``; otherwise `false. */ isScriptPresent(url: string): boolean; /** * Checks whether a link element is already present in `` for the given style url. * This doesn't guarantee that the style has been loaded. * * @param {string} url The url of the loaded link. * @returns {boolean} `true` if an element matching the url is present in ``; otherwise `false. */ isStylePresent(url: string): boolean; /** * Loads a script programatically. * * @param url The full url of the script to load. * @param options (Optional) Specifies custom options to override default behaviour. * @returns An observable object which allows subscribers to know when the script has been loaded and access its associated `