import * as _angular_core from '@angular/core';
import { OnInit, AfterViewInit, OnDestroy, ElementRef, Renderer2, DoCheck } from '@angular/core';
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
import { NgControl, ControlValueAccessor } from '@angular/forms';
import * as i1 from '@eui/components/shared';

/**
 * A directive that automatically adjusts the height of a textarea based on its content.
 *
 * @directive
 * @selector textarea[autoResize]
 * @description
 * The AutoResizeDirective automatically adjusts the height of a textarea element as the user types,
 * ensuring that all content is visible without requiring manual resizing or scrolling.
 * It supports minimum and maximum row constraints and can be enabled/disabled dynamically.
 *
 * @example
 * ```html
 * <textarea autoResize [minRows]="2" [maxRows]="5"></textarea>
 * ```
 */
declare class AutoResizeDirective implements OnInit, AfterViewInit, OnDestroy {
    /**
     * @description
     * Controls whether the auto-resize functionality is enabled.
     * When true, the textarea will automatically adjust its height based on content.
     * When false, the textarea will behave normally.
     *
     * @default true
     */
    autoResize: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
    /**
     * @description
     * Sets the minimum number of rows for the textarea.
     * This value determines the initial height of the textarea.
     *
     * @param minRows - The minimum number of rows to display
     * @default 1
     */
    minRows: _angular_core.InputSignalWithTransform<number, NumberInput>;
    /**
     * @description
     * Sets the maximum number of rows for the textarea.
     * When set to a value greater than 0, the textarea will not grow beyond this number of rows
     * and will show scrollbars if necessary.
     * When set to 0, there is no maximum limit.
     *
     * @default 0
     */
    maxRows: _angular_core.InputSignalWithTransform<number, NumberInput>;
    protected el: ElementRef<any>;
    protected renderer: Renderer2;
    protected control: NgControl;
    private destroy$;
    private observer;
    constructor();
    /**
     * Event handler for input events on the textarea.
     * Triggers the resize calculation when the content changes.
     *
     * @internal
     */
    onInput(): void;
    /**
     * Initializes the directive by setting up window resize event handling
     * and mutation observer for readonly attribute changes.
     *
     * @internal
     */
    ngOnInit(): void;
    /**
     * Performs initial resize after view initialization and sets up form control value change handling if applicable.
     *
     * @internal
     */
    ngAfterViewInit(): void;
    /**
     * Cleans up subscriptions and disconnects observers when the directive is destroyed.
     *
     * @internal
     */
    ngOnDestroy(): void;
    /**
     * Calculates and sets the appropriate height for the textarea based on its content.
     * This method creates a temporary clone of the textarea to measure the required height,
     * taking into account minRows and maxRows constraints.
     *
     * The calculation process:
     * 1. Creates a hidden clone of the textarea
     * 2. Sets the clone's width to match the original
     * 3. Measures the required height based on content
     * 4. Applies maxRows constraint if specified
     * 5. Updates the original textarea's height
     *
     * @public
     */
    resize(): void;
    /**
     * Sets up subscription to form control value changes to trigger resize when the value
     * is changed programmatically through the form control.
     *
     * @protected
     */
    protected handleFormControlChanges(): void;
    /**
     * Mutation observer callback that handles changes to the readonly attribute
     * and triggers resize when necessary.
     *
     * @param mutationsList - List of mutations that occurred
     * @private
     */
    private readonlyMutationObserver;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AutoResizeDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AutoResizeDirective, "textarea[autoResize]", never, { "autoResize": { "alias": "autoResize"; "required": false; "isSignal": true; }; "minRows": { "alias": "minRows"; "required": false; "isSignal": true; }; "maxRows": { "alias": "maxRows"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

/**
 * @description
 * Multiline text input field for entering longer text content.
 * `euiTextArea` provides an enhanced textarea component with full Angular forms integration, validation state handling, readonly display mode, and optional automatic height adjustment.
 * It is designed to be used as an attribute selector on a `textarea` element.
 *
 * @usageNotes
 * ### Basic Usage
 * ```html
 * <!-- Simple textarea -->
 * <textarea euiTextArea placeholder="Enter description"></textarea>
 *
 * <!-- With reactive forms -->
 * <form [formGroup]="form">
 *   <textarea euiTextArea formControlName="description"></textarea>
 * </form>
 *
 * <!-- Readonly mode -->
 * <textarea euiTextArea [readonly]="true" [value]="content"></textarea>
 * ```
 *
 * ```typescript
 * form = new FormGroup({
 *   description: new FormControl('', [Validators.required, Validators.maxLength(500)])
 * });
 * ```
 *
 * ### Accessibility
 * - Associate with label using for/id attributes
 * - Provide placeholder text as guidance, not as label replacement
 * - Use aria-describedby for helper text or error messages
 * - Ensure sufficient color contrast in all states
 *
 * ### Notes
 * - Automatically tracks number of text rows via rowsChange event
 * - Validation state (invalid/danger) syncs with form control
 * - Readonly mode displays content in a styled container
 * - Disabled state prevents all user interaction
 */
declare class EuiTextareaComponent implements OnInit, OnDestroy, DoCheck, ControlValueAccessor {
    /**
     * Static counter used to generate unique IDs for textarea instances
     * @static
     */
    static idCounter: number;
    /**
     * Event emitter that fires when the number of text rows in the textarea changes
     */
    rowsChange: _angular_core.OutputEmitterRef<number>;
    get class(): string;
    /**
     * The disabled state of the textarea
     * @description When set to true, prevents user interaction with the textarea.
     * This can be controlled either directly or through form control binding.
     */
    disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
    /**
     * The readonly state of the textarea
     * @description When true, displays the textarea content in a read-only format
     * with special styling.
     */
    readonly: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
    /**
     * Unique identifier for the textarea
     * @default eui-textarea_{increment}
     */
    id: _angular_core.InputSignal<string>;
    /**
     * Flag indicating if the textarea is in an invalid state
     * @description When true, applies error styling to the textarea.
     * This can be set manually or automatically through form validation.
     */
    isInvalid: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
    /**
     * @description
     * Data attribute for end-to-end testing
     * @default eui-textarea
     */
    e2eAttr: _angular_core.InputSignal<string>;
    protected hostEl: HTMLTextAreaElement;
    protected hostParentEl: HTMLElement;
    protected hostWrapperEl: HTMLDivElement;
    protected valueContainerEl: HTMLDivElement;
    protected innerDisabled: _angular_core.WritableSignal<boolean>;
    private innerIsInvalid;
    private destroy$;
    private control;
    private rows;
    private injector;
    private _elementRef;
    private _renderer;
    private baseStatesDirective;
    constructor();
    /**
     * Handles input changes in the textarea
     * @param {string} value - The new value of the textarea
     * @description Updates the number of rows and triggers change detection
     */
    onInputChange(value: string): void;
    /**
     * Handles blur events on the textarea
     * @param {string} value - The current value of the textarea
     * @description Marks the control as touched and triggers validation
     */
    onBlur(value: string): void;
    /**
     * @description
     * Lifecycle hook that initializes the component. Sets up DOM elements,
     * initializes form control integration, and establishes state management
     */
    ngOnInit(): void;
    /**
     * @description
     * Lifecycle hook that checks for changes in form control state
     * Updates invalid state based on form control validation
     */
    ngDoCheck(): void;
    /**
     * @description
     * Lifecycle hook that cleans up component resources
     * Completes observables and removes generated DOM elements
     */
    ngOnDestroy(): void;
    /**
     * @description
     * ControlValueAccessor implementation for writing values
     * @param {unknown} obj - The value to write to the textarea
     */
    writeValue(obj: unknown): void;
    /**
     * @description
     * Registers the callback function for change events
     * @param {Function} fn - The callback function
     */
    registerOnChange(fn: () => void): void;
    /**
     * @description
     * Registers the callback function for touched events
     * @param {Function} fn - The callback function
     */
    registerOnTouched(fn: () => void): void;
    /**
     * @description
     * Sets the disabled state of the textarea
     * @param {boolean} isDisabled - The disabled state to set
     */
    setDisabledState(isDisabled: boolean): void;
    protected onChange(_: unknown): void;
    protected onTouched(_: unknown): void;
    /**
     * @description
     * Creates the container for the textarea element
     * @returns {HTMLDivElement} The created wrapper container element
     * @private
     */
    private createHostWrapperContainer;
    /**
     * @description
     * Creates the container for displaying readonly values
     * @returns {HTMLDivElement} The created value container element
     * @private
     */
    private createValueContainer;
    /**
     * @description
     * Handles the DOM manipulation for the textarea structure
     * Wraps the textarea in necessary containers and adds
     * the readonly value display element
     *
     * @private
     */
    private handleMarkup;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EuiTextareaComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EuiTextareaComponent, "textarea[euiTextArea]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "isInvalid": { "alias": "isInvalid"; "required": false; "isSignal": true; }; "e2eAttr": { "alias": "e2eAttr"; "required": false; "isSignal": true; }; }, { "rowsChange": "rowsChange"; }, never, ["*"], true, [{ directive: typeof i1.BaseStatesDirective; inputs: { "euiDisabled": "euiDisabled"; "euiDanger": "euiDanger"; }; outputs: {}; }]>;
}

declare const EUI_TEXTAREA: readonly [typeof EuiTextareaComponent, typeof AutoResizeDirective];

export { AutoResizeDirective, EUI_TEXTAREA, EuiTextareaComponent };
//# sourceMappingURL=eui-components-eui-textarea.d.ts.map
