import { EventEmitter, OnInit, OnChanges, SimpleChanges, ChangeDetectorRef, ElementRef } from "@angular/core";
import { BehaviorSubject } from "rxjs";
import { DxcTextInputService } from "./services/dxc-text-input.service";
import { OnDestroy } from "@angular/core";
import { DxcTextInputHelper } from "./dxc-text-input.helper";
import { BackgroundProviderService } from "../background-provider/service/background-provider.service";
import { ControlValueAccessor } from "@angular/forms";
import EmittedValue from "./emitted-value.type";
import { Space, Spacing, TextInputProperties } from "./dxc-text-input.types";
import * as i0 from "@angular/core";
export declare class DxcTextInputComponent implements OnInit, OnChanges, OnDestroy, ControlValueAccessor {
    private cdRef;
    private service;
    private helper;
    bgProviderService?: BackgroundProviderService;
    className: any;
    hasError: boolean;
    /**
     * Text to be placed above the input. This label will be used as the aria-label attribute of the list of suggestions.
     */
    label: string;
    /**
     * Name attribute of the input element.
     */
    name: string;
    /**
     * Value of the input. If undefined, the component will be uncontrolled and the value will be managed internally by the component.
     */
    value: string;
    /**
     * Initial value of the input, only when it is uncontrolled.
     */
    defaultValue: string;
    /**
     * Helper text to be placed above the input.
     */
    helperText: string;
    /**
     * Text to be put as placeholder of the input.
     */
    placeholder: string;
    /**
     * HTML autocomplete attribute. Lets the user specify if any permission the user agent has to provide automated assistance in filling out the input value.
     * Its value must be one of all the possible values of the HTML autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password', ...
     */
    autocomplete: string;
    hasAction: () => number;
    /**
     * If true, the component will be disabled.
     */
    get disabled(): boolean;
    set disabled(value: boolean);
    private _disabled;
    /**
     * If true, the input will be optional, showing '(Optional)'
     * next to the label. Otherwise, the field will be considered required and an error will be
     * passed as a parameter to the OnBlur and onChange events when it has
     * not been filled.
     */
    get optional(): boolean;
    set optional(value: boolean);
    private _optional;
    /**
     * If true, the input will have an action to clear the entered value.
     */
    clearable: boolean;
    /**
     * If it is a defined value and also a truthy string, the component will
     * change its appearance, showing the error below the input component. If the
     * defined value is an empty string, it will reserve a space below the
     * component for a future error, but it would not change its look. In case of
     * being undefined or null, both the appearance and the space for the error
     * message would not be modified.
     */
    error: string;
    /**
     * Regular expression that defines the valid format allowed by the input.
     * This will be checked when the input loses the focus. If the value entered
     * does not match the pattern, the onBlur event will emit with the value
     * entered and the error informing that the value does not match the pattern
     * as parameters. If the pattern is accomplished, the error parameter will be
     * undefined.
     */
    pattern: string;
    /**
     * Specifies the minimun length allowed by the input. This will be checked
     * both when the input element loses the focus and while typing within it. If
     * the string entered does not comply the minimum length, the onBlur and
     * onChange events will emit with the current value and an internal error
     * informing that the value length does not comply the specified range. If a
     * valid length is reached, the error parameter of both events will be undefined.
     */
    minLength: number;
    /**
     * Specifies the maximum length allowed by the input. This will be checked
     * both when the input element loses the focus and while typing within it. If
     * the string entered does not comply the maximum length, the onBlur and
     * onChange events will emit with the current value and an internal error
     * informing that the value length does not comply the specified range. If a
     * valid length is reached, the error parameter of both events will be undefined.
     */
    maxLength: number;
    /**
     * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
     * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
     */
    margin: Space | Spacing;
    /**
     * These are the options to be displayed as suggestions. It can be either an array or a function:
     *    - Array:    Array of options that will be filtered by the component.
     *    - Function: This function will be called when the user changes the value, we will send as a parameter the new value;
     *                apart from that this function should return one promise on which we should make 'then' to get the suggestions filtered.
     */
    suggestions: Array<string> | any;
    /**
     * Value of the tabindex attribute.
     */
    tabIndexValue: number;
    /**
     * Size of the component ('small' | 'medium' | 'large' | 'fillParent').
     */
    size: "small" | "medium" | "large" | "fillParent";
    id: string;
    autoSuggestId: string;
    private controlled;
    defaultInputs: BehaviorSubject<TextInputProperties>;
    /**
     * This event will emit when the user types within the input element
     * of the component. An object including the current value and the error (if
     * the value entered is not valid) will be passed to this function. An
     * example of this object is: { value: value, error: error }. If there is no
     * error, error will not be defined.
     */
    onChange: EventEmitter<EmittedValue>;
    /**
     * This event will emit when the input element loses the focus. An object
     * including the input value and the error (if the value entered is not
     * valid) will be passed to this function. An example of this object is: {
     * value: value, error: error }. If there is no error, error will not be
     * defined.
     */
    onBlur: EventEmitter<EmittedValue>;
    /**
     * This event will emit when the action is clicked.
     */
    onActionClick: EventEmitter<string>;
    inputRef: ElementRef;
    optionsRef: ElementRef;
    stepButtonMinus: ElementRef;
    stepButtonPlus: ElementRef;
    actionButton: ElementRef;
    autosuggestVisible: boolean;
    focusedOption: number;
    activedOption: number;
    filteredOptions: Array<string>;
    darkBackground: boolean;
    isDirty: boolean;
    options: Array<string>;
    loading: BehaviorSubject<boolean>;
    fetchingError: BehaviorSubject<boolean>;
    autosuggestType: string;
    validationError: string;
    isInputNumber: boolean;
    constructor(cdRef: ChangeDetectorRef, service: DxcTextInputService, helper: DxcTextInputHelper, bgProviderService?: BackgroundProviderService);
    onTouch: () => void;
    writeValue(value: any): void;
    registerOnChange(fn: any): void;
    registerOnTouched(fn: any): void;
    setDisabledState?(isDisabled: boolean): void;
    ngOnDestroy(): void;
    ngOnInit(): void;
    ngAfterViewInit(): void;
    ngOnChanges(changes: SimpleChanges): void;
    handleOnChange(event: any): void;
    handleDefaultClearAction(): void;
    handleActionOnClick(event: any): void;
    handleOnBlur(): void;
    handleOnFocus(): void;
    focusInput(): void;
    handleOnClick(): void;
    handleOnClose(): void;
    handleOnClickOption(event: any): void;
    handleEnterKey(): void;
    handleMouseDown(event: any, index: any): void;
    handleOnLeave(): void;
    handleOnKeyDown(event: any): void;
    private patternMatch;
    private validateValue;
    private handleValidationError;
    private isRequired;
    private isLengthIncorrect;
    getAsyncSuggestions(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<DxcTextInputComponent, [null, null, null, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<DxcTextInputComponent, "dxc-text-input", never, { "label": "label"; "name": "name"; "value": "value"; "defaultValue": "defaultValue"; "helperText": "helperText"; "placeholder": "placeholder"; "autocomplete": "autocomplete"; "disabled": "disabled"; "optional": "optional"; "clearable": "clearable"; "error": "error"; "pattern": "pattern"; "minLength": "minLength"; "maxLength": "maxLength"; "margin": "margin"; "suggestions": "suggestions"; "tabIndexValue": "tabIndexValue"; "size": "size"; }, { "onChange": "onChange"; "onBlur": "onBlur"; "onActionClick": "onActionClick"; }, never, ["dxc-text-input-prefix", "dxc-text-input-action", "dxc-text-input-suffix"]>;
}
//# sourceMappingURL=dxc-text-input.component.d.ts.map