import { ChangeDetectorRef, ElementRef, EventEmitter, OnInit, SimpleChanges } from "@angular/core";
import { BehaviorSubject } from "rxjs";
import { BackgroundProviderService } from "../../public-api";
import { DxcTextareaHelper } from "./dxc-textarea.helper";
import { Space, Spacing, TextareaProperties } from "./dxc-textarea.types";
import EmittedValue from "../dxc-text-input/emitted-value.type";
import * as i0 from "@angular/core";
export declare class DxcTextareaComponent implements OnInit {
    private cdRef;
    private helper;
    bgProviderService?: BackgroundProviderService;
    className: any;
    hasError: boolean;
    /**
     * Text to be placed above the textarea.
     */
    label: string;
    /**
     * Name attribute of the textarea element.
     */
    name: string;
    /**
     * Value of the textarea. If undefined, the component will be uncontrolled and the value will be managed internally.
     */
    value: string;
    /**
     * Default value given to the textarea when is uncontrolled and also maintains the uncontrolled behaviour.
     */
    defaultValue: string;
    /**
     * Helper text to be placed above the textarea.
     */
    helperText: string;
    /**
     * If true, the component will be disabled.
     */
    get disabled(): boolean;
    set disabled(value: boolean);
    private _disabled;
    /**
     * If true, the textarea 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 functions when it has not been filled.
     */
    get optional(): boolean;
    set optional(value: boolean);
    private _optional;
    /**
     * Number of rows of the textarea.
     */
    get rows(): number;
    set rows(value: number);
    private _rows;
    /**
     * Defines the textarea's ability to resize vertically. It can be:
        'auto': The textarea grows or shrinks automatically in order to fit the content.
        'manual': The height of the textarea is enabled to be manually modified.
        'none': The textarea has a fixed height and can't be modified.
     */
    verticalGrow: "auto" | "manual" | "none";
    /**
     * If it is defined, the component will change its appearance, showing the error below the textarea component.
     * If it is not defined, the error messages will be created and managed internally.
     */
    error: any;
    /**
     * Text to be put as placeholder of the textarea.
     */
    placeholder: string;
    /**
     * Regular expression that defines the valid format allowed by the textarea.
     * This will be checked when the textarea loses the focus.
     * If the value entered does not match the pattern, the onBlur function will be called 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 null.
     */
    pattern: string;
    /**
     * Specifies the minimun length allowed by the textarea.
     * 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 functions will be called
     * 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 null.
     */
    minLength: number;
    /**
     * Specifies the maximum length allowed by the textarea.
     * 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 functions will be called
     * 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 null.
     */
    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;
    /**
     * Value of the tabindex attribute.
     */
    tabIndexValue: number;
    /**
     * Size of the component ('small' | 'medium' | 'large' | 'fillParent').
     */
    size: "small" | "medium" | "large" | "fillParent";
    /**
     * HTML autocomplete attribute. Lets the user specify if any permission the user agent has to provide automated assistance in filling out
     * the textarea value. Its value must be one of all the possible values of the HTML autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password', ...
     */
    autocomplete: string;
    private controlled;
    defaultInputs: BehaviorSubject<TextareaProperties>;
    /**
     * This event will emit when the user types within the textarea. An object including the new value and the error will be passed to this function.
     * An example of this object is: { value: value, error: error }. If there is no error, error will be null.
     */
    onChange: EventEmitter<EmittedValue>;
    /**
     * This event will emit when the textarea loses the focus. An object including the textarea value and the error will be passed to this function.
     * An example of this object is: { value: value, error: error }. If there is no error, error will be null.
     */
    onBlur: EventEmitter<EmittedValue>;
    textareaRef: ElementRef;
    darkBackground: boolean;
    isDirty: boolean;
    validationError: string;
    textareaId: string;
    constructor(cdRef: ChangeDetectorRef, helper: DxcTextareaHelper, bgProviderService?: BackgroundProviderService);
    ngOnChanges(changes: SimpleChanges): void;
    ngOnInit(): void;
    ngAfterViewInit(): void;
    handleOnChange(event: any): void;
    handleOnBlur(): void;
    handleOnFocus(): void;
    private validateValue;
    private handleValidationError;
    private patternMatch;
    private isRequired;
    private isLengthIncorrect;
    private checkHeight;
    static ɵfac: i0.ɵɵFactoryDeclaration<DxcTextareaComponent, [null, null, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<DxcTextareaComponent, "dxc-textarea", never, { "label": "label"; "name": "name"; "value": "value"; "defaultValue": "defaultValue"; "helperText": "helperText"; "disabled": "disabled"; "optional": "optional"; "rows": "rows"; "verticalGrow": "verticalGrow"; "error": "error"; "placeholder": "placeholder"; "pattern": "pattern"; "minLength": "minLength"; "maxLength": "maxLength"; "margin": "margin"; "tabIndexValue": "tabIndexValue"; "size": "size"; "autocomplete": "autocomplete"; }, { "onChange": "onChange"; "onBlur": "onBlur"; }, never, never>;
}
//# sourceMappingURL=dxc-textarea.component.d.ts.map