import * as i0 from '@angular/core';

declare class CertificateGenModel {
    dn: string;
    oids: string;
    templateId: string;
    containerName: string;
    providerName: string;
    providerType: number;
    keyLength: number;
    constructor(guid: string);
}
interface IDnCertificate {
    getDn(): string;
}
declare class DnCertificate {
    commonName: string;
    surname: string;
    givenName: string;
    country: string;
    state: string;
    locality: string;
    street: string;
    email: string;
    inn: string;
    snils: string;
    unstructuredName: string;
    constructor(item: any);
    _makePartDN(name: string, oid: string, value: string, useQuotesForValues?: boolean, useOids?: boolean): string;
    _x500Encode(source: string): string;
    _snils(snils: string): string;
}
declare class JuridicalCertificate extends DnCertificate implements IDnCertificate {
    organization: string;
    organizationUnit: string;
    title: string;
    innLE: string;
    ogrn: string;
    constructor(item: any);
    getDn(): string;
}
declare class IndividualCertificate extends DnCertificate implements IDnCertificate {
    organization: string;
    ogrnip: string;
    constructor(item: any);
    getDn(): string;
}
declare class PhysicalCertificate extends DnCertificate implements IDnCertificate {
    constructor(item: any);
    getDn(): string;
}

declare class CertificateGeneratorBase {
    setTimeoutRetry(interval: any, retryCount: any, check: any, body: any, fail: any): void;
}

declare class CertificateGeneratorAsync extends CertificateGeneratorBase {
    private _errors;
    constructor();
    createRequest(genCert: CertificateGenModel): any;
    installResponse(response: any): any;
    private _enrollRequest;
    private _addTemplate;
    private _addKeyUsage;
    private _addOids;
    private _getOid;
}

declare class CertificateGeneratorSync extends CertificateGeneratorBase {
    constructor();
    createRequest(genCert: CertificateGenModel): Promise<unknown>;
    installResponse(response: any): Promise<unknown>;
}

declare function initGenerator(): void;
declare class CertificateGeneratorFactory {
    get(): CertificateGeneratorAsync | CertificateGeneratorSync;
    private _checkAsyncPlugin;
}

interface ICryptoProvider {
    version(): Promise<any>;
    getCertCollection(): Promise<any>;
    sign(dataBase64: any, hash: any, isDetached: any, isEncode?: any): Promise<any>;
}

declare class CryptoProviderFactory {
    private _disabled;
    private _consts;
    private _cryptoProvider;
    constructor();
    createCryptoProvider(): ICryptoProvider;
    private _getBrowserBehavior;
    get(): ICryptoProvider;
    disable(): void;
}

declare function initCtypto(): void;

declare class CryptoModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<CryptoModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<CryptoModule, never, never, never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<CryptoModule>;
}

declare global {
    interface Window extends Record<string, any> {
        cadesplugin: any;
        cadesplugin_skip_extension_install: any;
        ActiveXObject: any;
        CryptoProviderFactory: any;
        CryptoProviderCodes: any;
        CertificateGeneratorFactory: any;
    }
}

export { CertificateGenModel, CertificateGeneratorFactory, CryptoModule, CryptoProviderFactory, DnCertificate, IndividualCertificate, JuridicalCertificate, PhysicalCertificate, initCtypto, initGenerator };
export type { IDnCertificate };
