import * as i1 from '@agorapulse/ui-components/input';
import { InputDirective } from '@agorapulse/ui-components/input';
import * as i0 from '@angular/core';
import { inject, ElementRef, Renderer2, booleanAttribute, HostBinding, Input, Directive } from '@angular/core';

class TextareaDirective {
    resizable = false;
    elementRef = inject(ElementRef);
    renderer = inject(Renderer2);
    constructor() {
        const textarea = this.elementRef.nativeElement;
        if (!textarea.rows || textarea.rows < 3) {
            textarea.rows = 3;
        }
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: TextareaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.2.16", type: TextareaDirective, isStandalone: true, selector: "[apTextarea]", inputs: { resizable: ["resizable", "resizable", booleanAttribute] }, host: { properties: { "class.resizable": "this.resizable" }, classAttribute: "ap-textarea" }, hostDirectives: [{ directive: i1.InputDirective }], ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: TextareaDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[apTextarea]',
                    standalone: true,
                    hostDirectives: [InputDirective],
                    host: {
                        class: 'ap-textarea',
                    },
                }]
        }], ctorParameters: () => [], propDecorators: { resizable: [{
                type: HostBinding,
                args: ['class.resizable']
            }, {
                type: Input,
                args: [{
                        transform: booleanAttribute,
                    }]
            }] } });

/**
 * Generated bundle index. Do not edit.
 */

export { TextareaDirective };
//# sourceMappingURL=agorapulse-ui-components-textarea.mjs.map
