import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal';
import * as i0 from '@angular/core';
import * as _c8y_client from '@c8y/client';
import { IManagedObject, FetchClient, InventoryService, IResult, IResultList } from '@c8y/client';
import * as rxjs from 'rxjs';
import { Subject, BehaviorSubject } from 'rxjs';
import * as packages_client_lib from 'packages/client/lib';
import { CdkStep } from '@angular/cdk/stepper';
import { FormGroup } from '@angular/forms';
import * as i1 from '@c8y/ngx-components';
import { AppStateService, C8yStepper, GainsightService, TenantUiService } from '@c8y/ngx-components';
import { FormlyFieldConfig } from '@ngx-formly/core';
import { TranslateService } from '@ngx-translate/core';
import { RegisterDeviceFactory, RegisterDeviceItem } from '@c8y/ngx-components/register-device';

declare class LoriotDeviceRegistrationButtonComponent {
    private modalService;
    constructor(modalService: BsModalService);
    open(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<LoriotDeviceRegistrationButtonComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<LoriotDeviceRegistrationButtonComponent, "c8y-loriot-registration", never, {}, {}, never, never, true, never>;
}

interface LoriotDevice {
    title: string;
    deveui: string;
    appeui: string;
    appkey: string;
    appid: string;
    deviceType: IManagedObject;
    error?: string;
    lnsConnectionName: string;
}
interface Application {
    deviceLimit: number;
    devices: number;
    hexId: string;
    name: string;
    outputs: Array<any>;
}
interface LoriotDeviceFormly extends LoriotDevice {
    connection: {
        name: string;
        description: string;
        baseUrl: string;
        username: string;
        password: string;
    };
    application: Application;
}

declare class LoriotProviderService {
    private client;
    private inventoryService;
    private translateService;
    private appState;
    private readonly baseUrl;
    private readonly registrationUrl;
    private readonly header;
    private readonly applicationsUrl;
    constructor(client: FetchClient, inventoryService: InventoryService, translateService: TranslateService, appState: AppStateService);
    getConnections(): Promise<{
        res: _c8y_client.IFetchResponse;
        data: any;
    }>;
    createDevice(device: LoriotDevice): Promise<IResult<LoriotDevice>>;
    getAvailableProtocols(filter?: object): Promise<IResultList<IManagedObject>>;
    getApplications(connectionName: string): Promise<IResultList<Application>>;
    private throwNoConnectivitySettingsError;
    private throwConnectivitySettingsError;
    private throwRegistrationError;
    private throwDeviceProtocolsFetchError;
    private throwNoDeviceProtocolsError;
    private throwApplicationError;
    static ɵfac: i0.ɵɵFactoryDeclaration<LoriotProviderService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<LoriotProviderService>;
}

type LoriotState = 'loadPending' | 'loadSuccess' | 'loadError' | 'registrationPending' | 'registrationSuccess' | 'registrationError';
declare class LoriotDeviceRegistrationComponent {
    bsModalRef: BsModalRef;
    private loriotService;
    private gainsightService;
    stepper: C8yStepper;
    readonly PAGING: object;
    form: FormGroup<{}>;
    model: LoriotDeviceFormly;
    protocols$: rxjs.Observable<packages_client_lib.IResultList<packages_client_lib.IManagedObject>>;
    connections$: rxjs.Observable<{
        res: packages_client_lib.IFetchResponse;
        data: any;
    }>;
    unsubscribe$: Subject<void>;
    load$: rxjs.Observable<any[]>;
    fields: FormlyFieldConfig[];
    registrationStepLabels: {
        next: "Register";
    };
    finalStepLabels: {
        back: "Close";
    };
    state: LoriotState;
    errors$: BehaviorSubject<Error[]>;
    errorMessages$: rxjs.Observable<any>;
    constructor(bsModalRef: BsModalRef, loriotService: LoriotProviderService, gainsightService: GainsightService);
    create(event: {
        stepper: C8yStepper;
        step: CdkStep;
    }): Promise<void>;
    getLoriotDeviceToSend(): LoriotDevice;
    getProtocols$(): rxjs.Observable<packages_client_lib.IResultList<packages_client_lib.IManagedObject>>;
    getConnections$(): rxjs.Observable<{
        res: packages_client_lib.IFetchResponse;
        data: any;
    }>;
    getApplications$(name: any): rxjs.Observable<packages_client_lib.IResultList<Application>>;
    ngOnDestroy(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<LoriotDeviceRegistrationComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<LoriotDeviceRegistrationComponent, "c8y-loriot-registration", never, {}, {}, never, never, true, never>;
}

declare class LoriotDeviceRegistrationFactory implements RegisterDeviceFactory {
    private tenantService;
    constructor(tenantService: TenantUiService);
    get(): RegisterDeviceItem[];
    static ɵfac: i0.ɵɵFactoryDeclaration<LoriotDeviceRegistrationFactory, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<LoriotDeviceRegistrationFactory>;
}

declare class LoriotDeviceRegistrationModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<LoriotDeviceRegistrationModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<LoriotDeviceRegistrationModule, never, [typeof i1.CoreModule, typeof i1.CommonModule, typeof LoriotDeviceRegistrationButtonComponent, typeof LoriotDeviceRegistrationComponent], never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<LoriotDeviceRegistrationModule>;
}

export { LoriotDeviceRegistrationButtonComponent, LoriotDeviceRegistrationComponent, LoriotDeviceRegistrationFactory, LoriotDeviceRegistrationModule };
//# sourceMappingURL=index.d.ts.map
