import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnDestroy, OnInit, QueryList } from '@angular/core';
import { AbstractControl, FormBuilder, FormGroup } from '@angular/forms';
import { IonInput, IonSelect, IonToggle } from '@ionic/angular';
import { Observable, Subscription } from 'rxjs';
export declare namespace InlineEditorComponent {
    type InputOptions = ToggleOptions | NumberOptions | PasswordOptions | TextOptions | SelectOptions;
    interface ToggleOptions {
        type: 'toggle';
    }
    interface NumberOptions {
        min?: number;
        max?: number;
        type: 'number';
    }
    interface PasswordOptions {
        pattern?: RegExp;
        minLength?: number;
        maxLength?: number;
        type: 'password';
    }
    interface TextOptions {
        pattern?: RegExp;
        minLength?: number;
        maxLength?: number;
        placeholder?: string;
        type: 'text';
    }
    interface SelectOptions {
        type: 'select';
        options?: SelectOptions.Options;
        multiple?: boolean;
    }
    namespace SelectOptions {
        type Options = {
            key: any;
            text: string;
        }[];
    }
}
export declare class InlineEditorComponent<ValueType = any> implements OnInit, OnDestroy, AfterViewInit {
    private changeDetectorRef;
    /**
     * Value to submit
     */
    pendingSubmitValue: any;
    /**
     * Emitted when focus is out of this component
     */
    focusOut: EventEmitter<number>;
    /**
     * Emitter when form is submit
     */
    onSubmit: EventEmitter<{
        target: {
            value: string;
        };
    }>;
    /**
     * Emitted when value changed
     */
    onValueChanged: EventEmitter<ValueType>;
    /**
     * Emitted when user cancel edit mode
     */
    onCancelEdit: EventEmitter<any>;
    /**
     * Emitted when edit mode change
     */
    editModeChange: EventEmitter<boolean>;
    /**
     * Enable/disable edit mode
     */
    set editMode(v: boolean);
    /**
     * True if we show refresh button
     */
    refreshable: boolean;
    /**
     * True if field can be edited
     */
    editable: boolean;
    unitValue: string;
    /**
     * Input option
     * You can defined how input will be rendered: text, number, toggle, select, ...
     */
    inputOptions: InlineEditorComponent.InputOptions | any;
    toggleTextLeft: string;
    toggleTextRight: string;
    /**
     * Additional style for value
     */
    valueStyle?: string;
    /**
     * Do not automatically trigger onSubmit if option is set to false
     */
    set waitForSubmit(v: boolean);
    /**
     * Enable/disable loading state
     */
    loading: boolean;
    /**
     * Set observable to subscribe to get value updates
     */
    set value(obs: Observable<ValueType> | ValueType);
    /**
     * Set value snapshot
     */
    set forceValue(value: any);
    /**
     * ion-item lines
     */
    set lines(v: string);
    /**
     * Enable/disable loader when submitting a value
     */
    showLoader: boolean;
    /**
     * Set field error message
     */
    set fieldError(err: Error);
    selectView: QueryList<IonSelect>;
    inputView: QueryList<IonInput>;
    toggle: IonToggle;
    private originalValue?;
    form: FormGroup;
    error?: Error;
    _editMode: boolean;
    private _shouldPerformViewAction;
    currentValue: any;
    subscription?: Subscription;
    _lines?: string;
    get hasPendingSubmit(): boolean;
    private _waitForSubmit;
    get lines(): string;
    field: AbstractControl;
    constructor(formBuilder: FormBuilder, changeDetectorRef: ChangeDetectorRef);
    ngOnInit(): void;
    ngAfterViewInit(): void;
    onSelectValueChange(event: CustomEvent<any>): void;
    ngOnDestroy(): void;
    _onValueChange(): void;
    onValueSubmit(): void;
    _onCancelEdit(): void;
    switchToggle(): void;
    onRefreshValue(): void;
    isEdited(): boolean;
    restaureValue(): void;
    setFieldValue(value: ValueType | undefined): void;
    explainWaitForSubmit(): void;
    onValueClick(): void;
    enableEditMode(): void;
    private openSelectDialog;
    private setInputFocus;
    private updateValue;
}
