import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
import { AbstractControl, FormBuilder } from '@angular/forms';
import { ToastController } from '@ionic/angular';
import { CurrentDeviceService, PendingCallManager, TapConfigItem, TapInfo, TapInfoCacheService, TapInfoConfigService, TapInfoDAOService, TapInfoHolder, TapInfoRequestService } from '@iotize/ionic';
import { TapConfigItemStateService } from '../tap-config-item-state.service';
import * as i0 from "@angular/core";
type ColorType = any;
export declare class TapConfigItemComponent<ValueType = any> implements OnDestroy, OnInit {
    private tapService;
    private toastController;
    private infoResolver;
    private tapInfoDAOService;
    private tapInfoCacheService;
    private tapConfigItemState;
    private tapInfoConfigService;
    focusOut: EventEmitter<number>;
    onSubmit: EventEmitter<{
        target: {
            value: string;
        };
    }>;
    pendingCallManager: PendingCallManager;
    editable?: boolean;
    set info(configOrKey: TapConfigItem<ValueType> | TapInfo);
    refresh: boolean;
    editMode: boolean;
    globalSubmit: boolean;
    get info(): TapConfigItem<ValueType>;
    get originalValue(): ValueType | undefined;
    private _valueSubscription?;
    private _formValueSubscription?;
    private _cancelChangeSubscription?;
    _config?: TapConfigItem<ValueType>;
    loading: boolean;
    readError?: Error;
    writeError?: Error;
    placeholder: string;
    displayedValue?: string;
    field: AbstractControl;
    ressourceAvailable: boolean;
    isEdited(): boolean;
    get config(): TapConfigItem<ValueType>;
    get inputOptions(): {
        formValidators?: import("@angular/forms").ValidatorFn[] | undefined;
        pattern?: RegExp | undefined;
        type?: "number" | "text" | "password" | "select" | "toggle" | "radio" | undefined;
        options?: {
            key: any;
            text: string;
            icon?: string | undefined;
        }[] | undefined;
        enum?: import("@iotize/ionic").EnumInfo | undefined;
        multiple?: boolean | undefined;
        max?: number | undefined;
        min?: number | undefined;
        maxLength?: number | undefined;
        minLength?: number | undefined;
    };
    get isEditable(): boolean | undefined;
    constructor(formBuilder: FormBuilder, tapService: CurrentDeviceService, toastController: ToastController, infoResolver: TapInfoRequestService, tapInfoDAOService: TapInfoDAOService, tapInfoCacheService: TapInfoCacheService, tapConfigItemState: TapConfigItemStateService, tapInfoConfigService: TapInfoConfigService);
    private _resetErrors;
    get pendingEditCall(): (() => Promise<any>) | undefined;
    private onConfigChange;
    initializeConfig(): void;
    setWriteError(error: Error): void;
    setReadError(error: Error | undefined): void;
    ngOnInit(): void;
    ngOnDestroy(): void;
    submit($event: Event): void;
    private runCall;
    onValueClick($event: CustomEvent): void;
    explainPendingCall(): Promise<void>;
    onFocusOut(): void;
    cancelEdit($event?: any): void;
    getFieldValue(): any;
    showToast(msg: string, color?: ColorType): Promise<void>;
    refreshValue(): Promise<TapInfoHolder<unknown>>;
    private _execRefreshKey;
    restaureValue(): void;
    setFieldValue(value: ValueType | undefined, options?: {
        emitEvent?: boolean;
    }): void;
    updateDisplayValue(): void;
    setDisplayValue(value: ValueType): string;
    getSelectedOption(value: ValueType): {
        key: any;
        text: string;
        icon?: string | undefined;
    } | undefined;
    get selectedOption(): {
        key: any;
        text: string;
        icon?: string | undefined;
    } | undefined;
    fetchValue(): Promise<void>;
    static ɵfac: i0.ɵɵFactoryDeclaration<TapConfigItemComponent<any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TapConfigItemComponent<any>, "tap-config-item", never, { "editable": "editable"; "info": "info"; "refresh": "refresh"; "editMode": "editMode"; "globalSubmit": "globalSubmit"; }, { "focusOut": "focusOut"; "onSubmit": "onSubmit"; }, never, never, false, never>;
}
export {};
