import * as i0 from '@angular/core';
import { OnInit } from '@angular/core';
import * as i2 from '@angular/router';
import * as i1 from '@c8y/ngx-components';
import { Permissions, DroppedFile, AlertService, ModalService, OptionsService, ForOfFilterPipe, ClipboardService, GainsightService, FeatureCacheService, NavigatorNodeFactory, NavigatorNode } from '@c8y/ngx-components';
import * as i3 from 'ngx-bootstrap/dropdown';
import * as i4 from 'ngx-bootstrap/datepicker';
import * as i5 from 'ngx-bootstrap/popover';
import * as rxjs from 'rxjs';
import { BehaviorSubject, Observable } from 'rxjs';
import { ICertificateRevocation, CrlService, TenantOptionsService, ITenantOption, ITrustedCertificate, IResultList, TrustedCertificateService, SystemOptionsService } from '@c8y/client';
import * as i4$1 from 'ngx-bootstrap/tooltip';
import * as i5$1 from '@angular/forms';
import * as i6 from 'ngx-bootstrap/buttons';
import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal';
import { TranslateService } from '@ngx-translate/core';

declare class TrustedCertificatesGuard {
    permissions: Permissions;
    canActivate(): Promise<boolean>;
    hasReadRole(): Promise<boolean>;
    hasAdminRole(): Promise<boolean>;
    static ɵfac: i0.ɵɵFactoryDeclaration<TrustedCertificatesGuard, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<TrustedCertificatesGuard>;
}

declare class CrlSettingsComponent {
    private crlService;
    private alertService;
    private modalService;
    private guard;
    crls: ICertificateRevocation[];
    droppedFiles: DroppedFile[];
    today: Date;
    hasReadRole$: rxjs.Observable<boolean>;
    hasAdminRole$: rxjs.Observable<boolean>;
    MANUAL_ENTRY_POPOVER: "In this section, you can override or add individual entries to the CRL. Providing the serial number is mandatory. In case the revocation date is not set, it will be configured to the current date.";
    FILE_UPLOAD_POPOVER: "In this section, you can upload a file with the list of certificates to be revoked. The file must be in CSV format, and it should include the serial number and revocation date. If the revocation date is empty, it will be set to the current date.";
    constructor(crlService: CrlService, alertService: AlertService, modalService: ModalService, guard: TrustedCertificatesGuard);
    downloadCrl(): Promise<void>;
    downloadCrlTemplate(): void;
    addCertificateRevocation(): void;
    removeCertificateRevocation(certificateRevocation: any): void;
    save(): Promise<void>;
    get isListEmpty(): any;
    get isFileDropped(): boolean;
    private confirm;
    private clearSavedData;
    private saveCrls;
    private uploadCrlFile;
    private getEmptyCertificateRevocation;
    static ɵfac: i0.ɵɵFactoryDeclaration<CrlSettingsComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<CrlSettingsComponent, "c8y-crl-settings", never, {}, {}, never, never, true, never>;
}

declare class CrlCheckSettingsComponent implements OnInit {
    private optionsService;
    private tenantOptionsService;
    private alertService;
    crlCheck: {
        online: boolean;
        offline: boolean;
    };
    constructor(optionsService: OptionsService, tenantOptionsService: TenantOptionsService, alertService: AlertService);
    ngOnInit(): Promise<void>;
    updateTenantOption(tenantOption: ITenantOption): Promise<void>;
    static ɵfac: i0.ɵɵFactoryDeclaration<CrlCheckSettingsComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<CrlCheckSettingsComponent, "c8y-crl-check-settings", never, {}, {}, never, never, true, never>;
}

declare class CrlSettingsModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<CrlSettingsModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<CrlSettingsModule, never, [typeof i1.CoreModule, typeof i1.CommonModule, typeof i2.RouterModule, typeof i3.BsDropdownModule, typeof i4.BsDatepickerModule, typeof i5.PopoverModule, typeof CrlSettingsComponent, typeof CrlCheckSettingsComponent], never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<CrlSettingsModule>;
}

interface TrustedCertificate extends ITrustedCertificate {
    signedVerificationCode?: string;
}

declare class TrustedCertificateListComponent implements OnInit {
    private bsModal;
    private alertService;
    private trustedCertificateService;
    private modalService;
    private translateService;
    private clipboardService;
    private gainsightService;
    private systemOptionsService;
    private featureCacheService;
    private guard;
    PROOF_OF_POSSESSION_POPOVER: "\"Proof of possession\" is a security method used to prove that whoever sends a message is also in the possession of the particular cryptographic key.";
    SIGNED_VERIFICATION_CODE_POPOVER: "Use the following openssl command to create the signed verification code: openssl dgst -sha256 -sign <private.key> <verification_code.txt> | openssl base64 -A";
    AUTO_REGISTRATION_POPOVER: "Devices using the MQTT protocol with credentials signed by this certificate will be able to communicate with the platform without prior registration. The option does not support devices using the LWM2M protocol.";
    reloading: BehaviorSubject<boolean>;
    reload: BehaviorSubject<void>;
    trustedCertificates: Observable<IResultList<ITrustedCertificate>>;
    sortByExpirationDateAsc: ForOfFilterPipe<ITrustedCertificate>;
    hasReadRole$: Observable<boolean>;
    hasAdminRole$: Observable<boolean>;
    certificateAuthorityExists: boolean;
    signedVerificationCode: string;
    PRODUCT_EXPERIENCE: {
        readonly EVENT: "trustedCertificate";
        readonly CERTIFICATES: {
            readonly COMPONENTS: {
                readonly TRUSTED_CERTIFICATE: "trusted-certificate";
            };
            readonly ACTIONS: {
                readonly ADD: "add";
                readonly UPDATE: "update";
                readonly DELETE: "delete";
                readonly RENEW: "renew";
            };
            readonly RESULTS: {
                readonly ADD_SUCCESS: "certificateAdded";
                readonly UPDATE_SUCCESS: "certificateUpdated";
                readonly DELETE_SUCCESS: "certificateDeleted";
                readonly RENEW_SUCCESS: "certificateRenewed";
            };
        };
        readonly VERIFICATION_CODE: {
            readonly COMPONENTS: {
                readonly REGENERATE_CODE: "regenerate-unsigned-verification-code";
                readonly VERIFY_CODE: "verify-signed-verification-code";
                readonly DOWNLOAD_CODE: "download-unsigned-verification-code";
            };
            readonly ACTIONS: {
                readonly REGENERATE: "regenerate";
                readonly VERIFY: "verify";
                readonly DOWNLOAD: "download";
            };
            readonly RESULTS: {
                readonly REGENERATE_SUCCESS: "unsignedVerificationCodeRegenerated";
                readonly VERIFY_SUCCESS: "signedCodeVerified";
                readonly VERIFY_FAILED: "signedCodeVerificationFailed";
            };
        };
    };
    certificateAuthorityFeatureEnabled: boolean;
    constructor(bsModal: BsModalService, alertService: AlertService, trustedCertificateService: TrustedCertificateService, modalService: ModalService, translateService: TranslateService, clipboardService: ClipboardService, gainsightService: GainsightService, systemOptionsService: SystemOptionsService, featureCacheService: FeatureCacheService, guard: TrustedCertificatesGuard);
    ngOnInit(): Promise<void>;
    loadTrustedCertificates(): Promise<void>;
    getTrustedCertificates(): Promise<IResultList<ITrustedCertificate>>;
    addTrustedCertificate(): Promise<void>;
    addCACertificate(): Promise<void>;
    deleteTrustedCertificate(certificate: any): Promise<void>;
    updateCertificate(trustedCertificate: ITrustedCertificate, updatingPart: Partial<ITrustedCertificate>): Promise<void>;
    getExpirationHighlight(item: ITrustedCertificate): {
        expired: boolean;
        icon: string;
        textClass: string;
        tooltipText: string;
        renewable: boolean;
    };
    regenerateUnsignedVerificationCode(trustedCertificate: ITrustedCertificate): void;
    verifySignedVerificationCode(trustedCertificate: TrustedCertificate): void;
    downloadUnsignedVerificationCode(trustedCertificate: ITrustedCertificate): void;
    copyUnsignedVerificationCodeToClipboard(trustedCertificate: ITrustedCertificate): void;
    onFileInput(event: any, trustedCertificate: TrustedCertificate): void;
    renewCertificate(): Promise<void>;
    private showLimitationAlert;
    private checkCertificateAuthorityFeature;
    static ɵfac: i0.ɵɵFactoryDeclaration<TrustedCertificateListComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TrustedCertificateListComponent, "c8y-trusted-certificates", never, {}, {}, never, never, true, never>;
}

declare class AddTrustedCertificateComponent {
    private modal;
    private trustedCertificateService;
    private alertService;
    private gainsightService;
    maxAllowedFiles: number;
    AUTO_REGISTRATION_POPOVER: "Devices using the MQTT protocol with credentials signed by this certificate will be able to communicate with the platform without prior registration. The option does not support devices using the LWM2M protocol.";
    trustedCertificate: Partial<ITrustedCertificate>;
    fileIsUploaded: boolean;
    result: Promise<any>;
    private _save;
    private _cancel;
    PRODUCT_EXPERIENCE: {
        readonly EVENT: "trustedCertificate";
        readonly CERTIFICATES: {
            readonly COMPONENTS: {
                readonly TRUSTED_CERTIFICATE: "trusted-certificate";
            };
            readonly ACTIONS: {
                readonly ADD: "add";
                readonly UPDATE: "update";
                readonly DELETE: "delete";
                readonly RENEW: "renew";
            };
            readonly RESULTS: {
                readonly ADD_SUCCESS: "certificateAdded";
                readonly UPDATE_SUCCESS: "certificateUpdated";
                readonly DELETE_SUCCESS: "certificateDeleted";
                readonly RENEW_SUCCESS: "certificateRenewed";
            };
        };
        readonly VERIFICATION_CODE: {
            readonly COMPONENTS: {
                readonly REGENERATE_CODE: "regenerate-unsigned-verification-code";
                readonly VERIFY_CODE: "verify-signed-verification-code";
                readonly DOWNLOAD_CODE: "download-unsigned-verification-code";
            };
            readonly ACTIONS: {
                readonly REGENERATE: "regenerate";
                readonly VERIFY: "verify";
                readonly DOWNLOAD: "download";
            };
            readonly RESULTS: {
                readonly REGENERATE_SUCCESS: "unsignedVerificationCodeRegenerated";
                readonly VERIFY_SUCCESS: "signedCodeVerified";
                readonly VERIFY_FAILED: "signedCodeVerificationFailed";
            };
        };
    };
    constructor(modal: BsModalRef, trustedCertificateService: TrustedCertificateService, alertService: AlertService, gainsightService: GainsightService);
    uploadFile(dropped: DroppedFile[]): void;
    save(): Promise<void>;
    close(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<AddTrustedCertificateComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AddTrustedCertificateComponent, "c8y-add-trusted-certificate", never, {}, {}, never, never, true, never>;
}

declare class TrustedCertificateListModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<TrustedCertificateListModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<TrustedCertificateListModule, never, [typeof i1.CoreModule, typeof i1.CommonModule, typeof i2.RouterModule, typeof i3.BsDropdownModule, typeof i4$1.TooltipModule, typeof i5$1.ReactiveFormsModule, typeof i6.ButtonsModule, typeof i5.PopoverModule, typeof TrustedCertificateListComponent, typeof AddTrustedCertificateComponent], never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<TrustedCertificateListModule>;
}

declare class TrustedCertificatesModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<TrustedCertificatesModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<TrustedCertificatesModule, never, [typeof i2.RouterModule, typeof CrlSettingsModule, typeof TrustedCertificateListModule], never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<TrustedCertificatesModule>;
}

declare class TrustedCertificatesNavigationFactory implements NavigatorNodeFactory {
    guard: TrustedCertificatesGuard;
    navs: NavigatorNode[];
    get(): Promise<NavigatorNode[]>;
    static ɵfac: i0.ɵɵFactoryDeclaration<TrustedCertificatesNavigationFactory, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<TrustedCertificatesNavigationFactory>;
}

export { AddTrustedCertificateComponent, TrustedCertificateListComponent, TrustedCertificatesModule, TrustedCertificatesNavigationFactory };
//# sourceMappingURL=index.d.ts.map
