import { InventoryService } from '@c8y/client';
import { Observable } from 'rxjs';
import { AssetType } from './asset-type.model';
import { AppStateService } from '../common/ui-state.service';
import { RealtimeSubjectService } from '../realtime/realtime-subject.service';
import * as i0 from "@angular/core";
/**
 * AssetTypesRealtimeService is being used to manage a cache of all existing asset types.
 * This service is injected in the AssetOverviewNavigationFactory class, which will trigger
 * the initialization of the cache as the constructor is called.
 */
export declare class AssetTypesRealtimeService {
    private inventory;
    private appStateService;
    private realtimeSubject;
    private readonly DEFAULT_ASSET_ICON;
    private readonly assetTypes$;
    private readonly refreshTrigger;
    private managedObjectRealtimeService;
    constructor(inventory: InventoryService, appStateService: AppStateService, realtimeSubject: RealtimeSubjectService);
    /**
     * Returns an asset type from the cache based on the unique name property.
     * @param name Name of the asset type.
     * @returns IManagedObject which represents the asset type.
     */
    getAssetTypeByName$(name: string): Observable<AssetType>;
    /**
     * Returns an asset type from the cache based on the id.
     * @param assetTypeId Id of the asset type.
     * @returns IManagedObject which represents the asset type.
     */
    getAssetTypeById$(assetTypeId: string): Observable<AssetType>;
    /**
     * Returns all the available asset types from the cache.
     * @returns available asset types.
     */
    getAssetTypesCache$(): Observable<Record<string, AssetType>>;
    /**
     * Extracts an icon from an asset type.
     * @param type Type of the asset type.
     * @returns Returns an icon for a given asset type.
     */
    getIcon$(type: string): Observable<string>;
    /**
     * Refreshes the asset types cache
     */
    refreshCache(): void;
    private initAssetTypes$;
    /**
     * Queries available asset types and adds every asset type to the local cache.
     * @returns available asset types.
     */
    private getAssetTypes;
    private getAssetTypes$;
    /**
     * Validates whether the MO to update local asset types cache is already present.
     * If present, the MO gets subscribed for future updates.
     * else, the MO will not be subscribed
     */
    private subscribeToCacheInvalidatorUpdates$;
    /**
     * Gets the MO that is used to update the local asset types cache.
     * @returns the id of the MO that has 'c8yAssetTypesCacheInvalidator' fragment, or 'null'
     */
    private getAssetTypesCacheInvalidator;
    static ɵfac: i0.ɵɵFactoryDeclaration<AssetTypesRealtimeService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AssetTypesRealtimeService>;
}
//# sourceMappingURL=asset-types.realtime.service.d.ts.map