import { Platform } from '@ionic/angular';
import { HostProtocol } from '@iotize/tap';
import { ReplaySubject } from 'rxjs';
import { CurrentDeviceService } from '../../current-device.service';
import { ProtocolMeta } from '../../extensions/protocol-info';
import { TapConnectionStoreItem } from './definitions';
import * as i0 from "@angular/core";
export declare namespace TapConnectionStoreService {
    interface InstanceOptions {
        /**
         * localStore key path to store connections
         */
        localStorageKey: string;
        /**
         * MQTT related options
         */
        mqtt: {
            /**
             * For browser app, we must connect to MQTT broker through websocket
             * We can specify the port to in this case.
             * For mobile app we use the same port configured in the Tap
             */
            webSocket?: {
                port: number;
            };
            /**
             * MQTT broker username to user
             * If not provided it will use TAP username
             */
            username?: string;
            /**
             * MQTT broker password to user
             * If not provided it will try to use TAP password (if not protected)
             */
            password?: string;
        };
    }
}
export declare class TapConnectionStoreService {
    private tapService;
    private platform;
    items: TapConnectionStoreItem[];
    values: ReplaySubject<TapConnectionStoreItem[]>;
    config: TapConnectionStoreService.InstanceOptions;
    constructor(tapService: CurrentDeviceService, platform: Platform);
    set(items: TapConnectionStoreItem[] | undefined): void;
    remove(item: TapConnectionStoreItem): void;
    /**
     * Try to add or refresh current stored connection info
     *
     */
    storeCurrentTapConnectionInfo(): Promise<boolean>;
    resolveConnectionProtocols(): Promise<ProtocolMeta[]>;
    resolveConnectionProtocol(protocol: HostProtocol): Promise<ProtocolMeta | undefined>;
    addOrRefresh(newItem: Pick<TapConnectionStoreItem, 'connection' | 'config'>): void;
    clear(): void;
    saveToStorage(): void;
    loadFromStorage(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<TapConnectionStoreService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<TapConnectionStoreService>;
}
