import * as i0 from '@angular/core';
import { forwardRef, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i2 from '@angular/forms';
import { NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
import { TextareaBaseComponent } from '@ironsource/fusion-ui/components/textarea/common/base';

function TextareaComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "div", 2);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("innerHTML", ctx_r0.error, i0.ɵɵsanitizeHtml);
} }
const _c0 = (a0, a1, a2) => ({ disabled: a0, resize: a1, error: a2 });
class TextareaComponent extends TextareaBaseComponent {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵTextareaComponent_BaseFactory; return function TextareaComponent_Factory(t) { return (ɵTextareaComponent_BaseFactory || (ɵTextareaComponent_BaseFactory = i0.ɵɵgetInheritedFactory(TextareaComponent)))(t || TextareaComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TextareaComponent, selectors: [["fusion-textarea"]], features: [i0.ɵɵProvidersFeature([
                {
                    provide: NG_VALUE_ACCESSOR,
                    useExisting: forwardRef(() => TextareaComponent),
                    multi: true
                }
            ]), i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 12, consts: [["minlength", "1", 1, "is-textarea", 3, "placeholder", "readonly", "required", "name", "ngClass", "ngModel", "disabled", "ngModelChange"], ["class", "error-msg", 3, "innerHTML", 4, "ngIf"], [1, "error-msg", 3, "innerHTML"]], template: function TextareaComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "textarea", 0);
            i0.ɵɵlistener("ngModelChange", function TextareaComponent_Template_textarea_ngModelChange_0_listener($event) { return ctx.onChange($event); });
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(1, TextareaComponent_div_1_Template, 1, 1, "div", 1);
        } if (rf & 2) {
            i0.ɵɵproperty("placeholder", ctx.placeholder)("readonly", ctx.readonly)("required", ctx.required)("name", ctx.name)("ngClass", i0.ɵɵpureFunction3(8, _c0, ctx.isDisabled, ctx.resize, ctx.error))("ngModel", ctx.model)("disabled", ctx.isDisabled);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.error);
        } }, dependencies: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.RequiredValidator, i2.MinLengthValidator, i2.NgModel], styles: ["[_nghost-%COMP%]   textarea[_ngcontent-%COMP%]::placeholder, [_nghost-%COMP%]   textarea[_ngcontent-%COMP%]{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}[_nghost-%COMP%]   .error-msg[_ngcontent-%COMP%]{font-size:11px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]   textarea.error[_ngcontent-%COMP%]:focus, [_nghost-%COMP%]   textarea[_ngcontent-%COMP%]:focus{background-color:var(--fu-light-100, #f7f8f9);border-bottom:solid 2px var(--fu-primary-500, #3083ff);padding-bottom:8px;outline:none;box-shadow:none}[_nghost-%COMP%]{height:inherit}[_nghost-%COMP%]   textarea[_ngcontent-%COMP%]{border:none;border-radius:4px;box-sizing:border-box;background-color:var(--fu-light-100, #f7f8f9);resize:none;width:100%;height:100%;padding:10px;color:var(--fu-dark-300, #313d91);min-height:50px}[_nghost-%COMP%]   textarea[_ngcontent-%COMP%]::placeholder{color:var(--fu-light-800, #8e959d)}[_nghost-%COMP%]   textarea[_ngcontent-%COMP%]:hover{background-color:var(--fu-light-200, #f0f1f2)}[_nghost-%COMP%]   textarea.resize[_ngcontent-%COMP%]{resize:both}[_nghost-%COMP%]   textarea.disabled[_ngcontent-%COMP%], [_nghost-%COMP%]   textarea[_ngcontent-%COMP%]:disabled{pointer-events:all;color:var(--fu-dark-200, #4c548e);resize:none}[_nghost-%COMP%]   textarea.disabled[_ngcontent-%COMP%]:hover, [_nghost-%COMP%]   textarea[_ngcontent-%COMP%]:disabled:hover{cursor:not-allowed}[_nghost-%COMP%]   textarea.disabled[_ngcontent-%COMP%]:focus, [_nghost-%COMP%]   textarea[_ngcontent-%COMP%]:disabled:focus{border-bottom:none;padding-bottom:10px}[_nghost-%COMP%]   textarea.error[_ngcontent-%COMP%]{background-color:var(--fu-negative-100, #ffefee)}[_nghost-%COMP%]   textarea.error[_ngcontent-%COMP%]:focus + .error-msg[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .error-msg[_ngcontent-%COMP%]{color:var(--fu-negative-500, #ff6a63);margin-top:-7px}"] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TextareaComponent, [{
        type: Component,
        args: [{ selector: 'fusion-textarea', changeDetection: ChangeDetectionStrategy.Default, providers: [
                    {
                        provide: NG_VALUE_ACCESSOR,
                        useExisting: forwardRef(() => TextareaComponent),
                        multi: true
                    }
                ], template: "<textarea\n  class=\"is-textarea\"\n  [placeholder]=\"placeholder\"\n  [readonly]=\"readonly\"\n  [required]=\"required\"\n  minlength=\"1\"\n  [name]=\"name\"\n  [ngClass]=\"{disabled: isDisabled, resize: resize, error:error}\"\n  [ngModel]=\"model\"\n  (ngModelChange)=\"onChange($event)\"\n  [disabled]=\"isDisabled\"></textarea>\n<div class=\"error-msg\" *ngIf=\"error\" [innerHTML]=\"error\"></div>\n", styles: [":host textarea::placeholder,:host textarea{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}:host .error-msg{font-size:11px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400}:host *{box-sizing:border-box}:host textarea.error:focus,:host textarea:focus{background-color:var(--fu-light-100, #f7f8f9);border-bottom:solid 2px var(--fu-primary-500, #3083ff);padding-bottom:8px;outline:none;box-shadow:none}:host{height:inherit}:host textarea{border:none;border-radius:4px;box-sizing:border-box;background-color:var(--fu-light-100, #f7f8f9);resize:none;width:100%;height:100%;padding:10px;color:var(--fu-dark-300, #313d91);min-height:50px}:host textarea::placeholder{color:var(--fu-light-800, #8e959d)}:host textarea:hover{background-color:var(--fu-light-200, #f0f1f2)}:host textarea.resize{resize:both}:host textarea.disabled,:host textarea:disabled{pointer-events:all;color:var(--fu-dark-200, #4c548e);resize:none}:host textarea.disabled:hover,:host textarea:disabled:hover{cursor:not-allowed}:host textarea.disabled:focus,:host textarea:disabled:focus{border-bottom:none;padding-bottom:10px}:host textarea.error{background-color:var(--fu-negative-100, #ffefee)}:host textarea.error:focus+.error-msg{display:none}:host .error-msg{color:var(--fu-negative-500, #ff6a63);margin-top:-7px}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TextareaComponent, { className: "TextareaComponent", filePath: "textarea.component.ts", lineNumber: 18 }); })();

class TextareaModule {
    static { this.ɵfac = function TextareaModule_Factory(t) { return new (t || TextareaModule)(); }; }
    static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: TextareaModule }); }
    static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, ReactiveFormsModule, FormsModule] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TextareaModule, [{
        type: NgModule,
        args: [{
                declarations: [TextareaComponent],
                exports: [TextareaComponent],
                imports: [CommonModule, ReactiveFormsModule, FormsModule]
            }]
    }], null, null); })();
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(TextareaModule, { declarations: [TextareaComponent], imports: [CommonModule, ReactiveFormsModule, FormsModule], exports: [TextareaComponent] }); })();

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

export { TextareaComponent, TextareaModule };
//# sourceMappingURL=ironsource-fusion-ui-components-textarea-v2.mjs.map
