import { OnInit, OnDestroy, ElementRef, AfterViewInit, Renderer2, OnChanges, SimpleChanges } from '@angular/core';
import { NgControl } from '@angular/forms';
import * as i0 from "@angular/core";
/**
 * 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>
 * ```
 */
export declare class AutoResizeDirective implements OnInit, OnChanges, 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: boolean;
    /**
     * @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
     */
    set minRows(minRows: number | string);
    /**
     * @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: number;
    protected el: ElementRef<any>;
    protected renderer: Renderer2;
    protected control: NgControl;
    private defaultRows;
    private destroy$;
    private observer;
    /**
     * 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;
    /**
     * Handles changes to the directive's inputs, particularly the autoResize property.
     * Updates the textarea's appearance and behavior accordingly.
     *
     * @param changes - Angular SimpleChanges object containing changed properties
     * @internal
     */
    ngOnChanges(changes: SimpleChanges): 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: i0.ɵɵFactoryDeclaration<AutoResizeDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<AutoResizeDirective, "textarea[autoResize]", never, { "autoResize": { "alias": "autoResize"; "required": false; }; "minRows": { "alias": "minRows"; "required": false; }; "maxRows": { "alias": "maxRows"; "required": false; }; }, {}, never, never, true, never>;
    static ngAcceptInputType_autoResize: unknown;
    static ngAcceptInputType_maxRows: unknown;
}
//# sourceMappingURL=auto-resize.directive.d.ts.map