import { Injector, Type } from '@angular/core';
import { PluginsResolveService } from '../plugins';
import * as i0 from "@angular/core";
/**
 * Registers a service using a specified extension key.
 * This function facilitates dynamic service registration, enabling services
 * to be retrieved and used throughout the application based on their extension key.
 *
 * @param extensionKey The unique identifier for the service, defined within the ExtensionKeys interface.
 * @param service The class type of the service to register.
 * @returns A provider configuration for Angular's dependency injection, allowing the service to be injected where needed.
 *
 *  * @example
 * ```typescript
 * hookService('layersServiceKey', TestService);
 * ```
 */
export declare function hookService<T extends string = keyof CumulocityServiceRegistry.SpecificExtensionKeys>(extensionKey: T, service: Type<CumulocityServiceRegistry.ExtensionKeys[T]>): import("@angular/core").ValueProvider | import("@angular/core").ClassProvider | import("@angular/core").ExistingProvider;
/**
 * Service for managing and retrieving dynamically registered services within the application.
 * It leverages a map of InjectionTokens to associate services with unique extension keys.
 */
export declare class ServiceRegistry {
    protected injectors: Injector[];
    constructor(rootInjector: Injector, pluginService: PluginsResolveService);
    /**
     * Retrieves instances of services registered under a specified extension key.
     *
     * @param key - The extension key associated with the desired service.
     * @returns An array of service instances registered under the given key.
     *
     * @example
     * ```typescript
     * // Retrieving instances of Service example
     * const layersServices = serviceRegistry.get('layersServiceKey');
     * layersServices.forEach(service => service.get().then(layer => console.log(layer)));
     * ```
     */
    get<T extends string = keyof CumulocityServiceRegistry.SpecificExtensionKeys, R = CumulocityServiceRegistry.ExtensionKeys[T]>(key: T): R[];
    /**
     * Allows to retrieve all registered extension keys.
     *
     * @returns An array of extension keys that have been registered.
     */
    getRegisteredExtensionKeys(): Array<keyof CumulocityServiceRegistry.ExtensionKeys>;
    static ɵfac: i0.ɵɵFactoryDeclaration<ServiceRegistry, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<ServiceRegistry>;
}
//# sourceMappingURL=service-registry.service.d.ts.map