import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal';
import * as i0 from '@angular/core';
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 * as _c8y_client from '@c8y/client';
import { IManagedObject, FetchClient, InventoryService, TenantOptionsService, IResultList, IResult } from '@c8y/client';
import { RegisterDeviceFactory, RegisterDeviceItem } from '@c8y/ngx-components/register-device';

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

interface SigfoxDevice {
    id: string;
    pac: string;
    deviceType: IManagedObject;
    contractId: string;
    prototype: boolean;
    productCertificate: string;
    error?: string;
    lnsConnectionName: string;
}
interface Contract {
    id: string;
    name: string;
}
interface SigfoxDeviceFormly extends SigfoxDevice {
    contract: Contract;
    connection: {
        name: string;
        description: string;
        baseUrl: string;
        parentGroupId: string;
        username: string;
        password: string;
    };
}

declare class SigfoxProviderService {
    private client;
    private inventoryService;
    private tenantOptions;
    private translateService;
    private appState;
    private readonly baseUrl;
    private readonly registrationUrl;
    private readonly contractsUrl;
    private readonly header;
    constructor(client: FetchClient, inventoryService: InventoryService, tenantOptions: TenantOptionsService, translateService: TranslateService, appState: AppStateService);
    getConnections(): Promise<{
        res: _c8y_client.IFetchResponse;
        data: any;
    }>;
    /**
     * Gets contracts from Sigfox platform.
     * @param connectionName The name of connection for which contracts will be retrieved
     * @returns The result list with contract, or throws an error with exception.
     */
    getContracts(connectionName: string): Promise<IResultList<any>>;
    createDevice(device: SigfoxDevice): Promise<IResult<SigfoxDevice>>;
    getAvailableProtocols(filter?: object): Promise<IResultList<IManagedObject>>;
    hasConnectivitySettings(): Promise<boolean>;
    private throwNoConnectivitySettingsError;
    private throwConnectivitySettingsError;
    private throwRegistrationError;
    private throwDeviceProtocolsFetchError;
    private throwNoDeviceProtocolsError;
    private throwContractError;
    private throwNoContractsError;
    static ɵfac: i0.ɵɵFactoryDeclaration<SigfoxProviderService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<SigfoxProviderService>;
}

type SigfoxState = 'loadPending' | 'loadSuccess' | 'loadError' | 'registrationPending' | 'registrationSuccess' | 'registrationError';
declare class SigfoxDeviceRegistrationComponent {
    bsModalRef: BsModalRef;
    private sigfoxService;
    private translateService;
    private gainsightService;
    stepper: C8yStepper;
    readonly PAGING: object;
    form: FormGroup<{}>;
    model: SigfoxDeviceFormly;
    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: SigfoxState;
    errors$: BehaviorSubject<Error[]>;
    errorMessages$: rxjs.Observable<any>;
    constructor(bsModalRef: BsModalRef, sigfoxService: SigfoxProviderService, translateService: TranslateService, gainsightService: GainsightService);
    create(event: {
        stepper: C8yStepper;
        step: CdkStep;
    }): Promise<void>;
    getSigfoxDeviceToSend(): SigfoxDevice;
    getContracts$(name: any): rxjs.Observable<packages_client_lib.IResultList<any>>;
    getProtocols$(): rxjs.Observable<packages_client_lib.IResultList<packages_client_lib.IManagedObject>>;
    getConnections$(): rxjs.Observable<{
        res: packages_client_lib.IFetchResponse;
        data: any;
    }>;
    ngOnDestroy(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<SigfoxDeviceRegistrationComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SigfoxDeviceRegistrationComponent, "c8y-sigfox-device-registration", never, {}, {}, never, never, true, never>;
}

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

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

export { SigfoxDeviceRegistrationButtonComponent, SigfoxDeviceRegistrationComponent, SigfoxDeviceRegistrationFactory, SigfoxDeviceRegistrationModule };
//# sourceMappingURL=index.d.ts.map
