import { OnInit } from '@angular/core';
import { AlertService, DroppedFile } from '@c8y/ngx-components';
import { Lwm2mConfigurationService } from '@c8y/ngx-components/protocol-lwm2m/services';
import { FormlyFieldConfig } from '@ngx-formly/core';
import { BindingMode, CertificateUsage, LWM2MEndpoint, ServerSettings } from '@c8y/ngx-components/protocol-lwm2m/model';
import { Lwm2mFormWrapperBase } from './form-wrapper-base.component';
import * as i0 from "@angular/core";
export declare class Lwm2mFormSingleServerSettings extends Lwm2mFormWrapperBase<ServerSettings> implements OnInit {
    protected service: Lwm2mConfigurationService<ServerSettings>;
    id: string;
    protected endpoint: LWM2MEndpoint;
    protected alert: AlertService;
    private readonly COAP;
    private readonly COAPS;
    private router;
    private route;
    constructor(service: Lwm2mConfigurationService<ServerSettings>);
    ngOnInit(): void;
    createForm(): {
        wrappers: string[];
        fieldGroup: ({
            key: string;
            type: string;
            defaultValue: boolean;
            props: {
                label: "Bootstrap server";
                description: "This configuration is for a bootstrap server";
                addonLabel?: undefined;
                required?: undefined;
                placeholder?: undefined;
            };
            hooks?: undefined;
            wrappers?: undefined;
            fieldGroup?: undefined;
        } | {
            key: string;
            type: string;
            props: {
                label: "Server URI";
                addonLabel: string;
                required: boolean;
                placeholder: string;
                description?: undefined;
            };
            hooks: {
                onInit: (field: FormlyFieldConfig) => import("rxjs").Observable<import("@ngx-formly/core/lib/models").FormlyValueChangeEvent>;
            };
            defaultValue?: undefined;
            wrappers?: undefined;
            fieldGroup?: undefined;
        } | {
            key: string;
            wrappers: string[];
            props: {
                label: string;
                description?: undefined;
                addonLabel?: undefined;
                required?: undefined;
                placeholder?: undefined;
            };
            fieldGroup: ({
                type: string;
                hooks: {
                    onInit: (field: FormlyFieldConfig) => import("rxjs").Observable<import("@ngx-formly/core/lib/models").FormlyValueChangeEvent>;
                };
                key?: undefined;
                props?: undefined;
                expressions?: undefined;
            } | {
                type: string;
                hooks?: undefined;
                key?: undefined;
                props?: undefined;
                expressions?: undefined;
            } | {
                key: string;
                type: string;
                props: {
                    label: "Server certificate";
                    placeholder: "Not written`setting`";
                    acceptUndefined: boolean;
                    removeExempliGratia: boolean;
                    options: import("rxjs").Observable<{
                        label: string;
                        value: string;
                    }[]>;
                    accept?: undefined;
                    description?: undefined;
                    forceHideList?: undefined;
                    dropped?: undefined;
                    remove?: undefined;
                    onPick?: undefined;
                    disabled?: undefined;
                };
                expressions: {
                    'props.disabled': (field: FormlyFieldConfig) => any;
                    hide: (field: FormlyFieldConfig) => boolean;
                };
                hooks?: undefined;
            } | {
                key: string;
                type: string;
                props: {
                    label: "Certificate usage";
                    placeholder: "Not written`setting`";
                    acceptUndefined: boolean;
                    removeExempliGratia: boolean;
                    options: {
                        label: CertificateUsage;
                        value: CertificateUsage;
                    }[];
                    accept?: undefined;
                    description?: undefined;
                    forceHideList?: undefined;
                    dropped?: undefined;
                    remove?: undefined;
                    onPick?: undefined;
                    disabled?: undefined;
                };
                expressions: {
                    'props.disabled': (field: FormlyFieldConfig) => any;
                    hide: (field: FormlyFieldConfig) => boolean;
                };
                hooks?: undefined;
            } | {
                key: string;
                type: string;
                props: {
                    accept: string;
                    label: "Certificate";
                    description: "One .pem file may be uploaded";
                    forceHideList: boolean;
                    dropped: (files: DroppedFile[]) => Promise<void>;
                    placeholder?: undefined;
                    acceptUndefined?: undefined;
                    removeExempliGratia?: undefined;
                    options?: undefined;
                    remove?: undefined;
                    onPick?: undefined;
                    disabled?: undefined;
                };
                expressions: {
                    hide: (field: FormlyFieldConfig) => boolean;
                    'props.disabled'?: undefined;
                };
                hooks?: undefined;
            } | {
                key: string;
                type: string;
                props: {
                    label: "Certificate Common Name";
                    remove: () => void;
                    onPick: (certificate: any) => void;
                    placeholder?: undefined;
                    acceptUndefined?: undefined;
                    removeExempliGratia?: undefined;
                    options?: undefined;
                    accept?: undefined;
                    description?: undefined;
                    forceHideList?: undefined;
                    dropped?: undefined;
                    disabled?: undefined;
                };
                expressions: {
                    'props.disabled': (field: FormlyFieldConfig) => any;
                    hide: (field: FormlyFieldConfig) => boolean;
                };
                hooks?: undefined;
            } | {
                key: string;
                type: string;
                props: {
                    accept: string;
                    label: "Private key";
                    description: "One .pem file may be uploaded";
                    forceHideList: boolean;
                    disabled: boolean;
                    dropped: (files: DroppedFile[]) => Promise<void>;
                    placeholder?: undefined;
                    acceptUndefined?: undefined;
                    removeExempliGratia?: undefined;
                    options?: undefined;
                    remove?: undefined;
                    onPick?: undefined;
                };
                expressions: {
                    'props.disabled': (field: FormlyFieldConfig) => any;
                    hide: (field: FormlyFieldConfig) => boolean;
                };
                hooks?: undefined;
            } | {
                key: string;
                type: string;
                props: {
                    label: "Fingerprint of the private key";
                    remove: () => void;
                    onPick: (privateKey: any) => void;
                    placeholder?: undefined;
                    acceptUndefined?: undefined;
                    removeExempliGratia?: undefined;
                    options?: undefined;
                    accept?: undefined;
                    description?: undefined;
                    forceHideList?: undefined;
                    dropped?: undefined;
                    disabled?: undefined;
                };
                expressions: {
                    'props.disabled': (field: FormlyFieldConfig) => any;
                    hide: (field: FormlyFieldConfig) => boolean;
                };
                hooks?: undefined;
            })[];
            type?: undefined;
            defaultValue?: undefined;
            hooks?: undefined;
        } | {
            wrappers: string[];
            props: {
                label: "Server object configuration";
                description?: undefined;
                addonLabel?: undefined;
                required?: undefined;
                placeholder?: undefined;
            };
            fieldGroup: ({
                key: string;
                type: string;
                defaultValue: boolean;
                props: {
                    label: "Store notifications";
                    description: "LWM2M Client to store notify operations when client is offline or LWM2M Server is disabled. Also used to forward them to the LWM2M Server when the client is able to connect.";
                    placeholder?: undefined;
                    min?: undefined;
                    options?: undefined;
                };
            } | {
                key: string;
                type: string;
                props: {
                    label: "Short Server ID";
                    description: "in numbers";
                    placeholder: string;
                    min: number;
                    options?: undefined;
                };
                defaultValue?: undefined;
            } | {
                key: string;
                type: string;
                props: {
                    label: "Registration lifetime";
                    description: "in seconds";
                    placeholder: string;
                    min: number;
                    options?: undefined;
                };
                defaultValue?: undefined;
            } | {
                key: string;
                type: string;
                props: {
                    label: "Default minimum period";
                    description: "in seconds";
                    placeholder: string;
                    min: number;
                    options?: undefined;
                };
                defaultValue?: undefined;
            } | {
                key: string;
                type: string;
                props: {
                    label: "Default maximum period";
                    description: "in seconds";
                    placeholder: string;
                    min: number;
                    options?: undefined;
                };
                defaultValue?: undefined;
            } | {
                key: string;
                type: string;
                defaultValue: BindingMode;
                props: {
                    label: "Binding mode";
                    options: {
                        label: "UDP" | "UDP with queue mode";
                        value: BindingMode;
                    }[];
                    description?: undefined;
                    placeholder?: undefined;
                    min?: undefined;
                };
            } | {
                key: string;
                type: string;
                props: {
                    label: "Disable timeout";
                    description: "in seconds";
                    placeholder: string;
                    min: number;
                    options?: undefined;
                };
                defaultValue?: undefined;
            })[];
            key?: undefined;
            type?: undefined;
            defaultValue?: undefined;
            hooks?: undefined;
        })[];
    }[];
    save(): void;
    delete(): void;
    cancel: () => Promise<boolean>;
    protected getFullURI(): string;
    private patchFingerprint;
    private patchCommonName;
    private removePrivateKeyAndFingerprint;
    private removeCertificateAndCommonName;
    static ɵfac: i0.ɵɵFactoryDeclaration<Lwm2mFormSingleServerSettings, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<Lwm2mFormSingleServerSettings, "c8y-lwm2m-form-single-server-settings", never, {}, {}, never, never, true, never>;
}
//# sourceMappingURL=single-server-settings.component.d.ts.map