import { IManagedObject } from '@c8y/client';
import { ApiService } from '@c8y/ngx-components/api';
import { AppStateService } from '../common/ui-state.service';
import { AssetType } from './asset-type.model';
import { AssetTypesRealtimeService } from './asset-types.realtime.service';
import * as i0 from "@angular/core";
/**
 * AssetTypesService 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.
 * @deprecated Consider using `AssetTypesRealtimeService` service instead.
 */
export declare class AssetTypesService {
    private assetTypesRealtimeService;
    private apiService;
    private appStateService;
    private readonly DEFAULT_ASSET_ICON;
    private assetTypesCache;
    private allowedMethods;
    constructor(assetTypesRealtimeService: AssetTypesRealtimeService, apiService: ApiService, appStateService: AppStateService);
    /**
     * 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): IManagedObject;
    /**
     * 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): IManagedObject;
    /**
     * Returns all the available asset types from the cache.
     * @returns available asset types.
     */
    getAssetTypesCache(): 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): string;
    /**
     * Add an asset type to the local cache.
     * @param assetType Asset type which should be added to the cache.
     * @returns void.
     */
    private addAssetType;
    /**
     * Delete an asset type from the local cache based on the given asset type id.
     * @param assetTypeId Id of the asset type which should be deleted.
     * @returns void.
     */
    private deleteAssetType;
    /**
     * Update an asset type in the local cache.
     * @param assetType Asset type which should be updated in the cache.
     * @returns void.
     */
    private updateAssetType;
    /**
     * Subscribes to api PUT, POST and DELETE requests interceptor to update local asset types cache.
     * If a new asset type has been created it will be added to the local cache. If an asset
     * type has been deleted it will be removed from the local cache.
     */
    private subscribeForAssetTypeUpdates;
    private isExpectedMethod;
    private handleDelete;
    private handlePutOrPost;
    private hasIsAssetTypeFragment;
    private getMoIdFromUrl;
    /**
     * Managed objects inventory api filter, allowing only PUT, POST and DELETE methods.
     * @param call Api call to filter.
     * @returns Returns true if api call meets the required criteria.
     */
    private checkIfInventoryMoApiCall;
    static ɵfac: i0.ɵɵFactoryDeclaration<AssetTypesService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AssetTypesService>;
}
//# sourceMappingURL=asset-types.service.d.ts.map