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%]   .is-textarea[_ngcontent-%COMP%]::placeholder, [_nghost-%COMP%]   .is-textarea[_ngcontent-%COMP%]{font-size:13px;font-family:var(--regular-font-family, \"Open Sans\");font-weight:400}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]   .is-textarea.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default;touch-callout:none;-webkit-user-select:none;user-select:none}[_nghost-%COMP%]{height:inherit}[_nghost-%COMP%]   .is-textarea[_ngcontent-%COMP%]{border-radius:3px;border:1px solid var(--light-color, #E1E6EB);resize:none;width:100%;height:100%;padding:10px;color:var(--dark-color-300, #172D4C);min-height:50px}[_nghost-%COMP%]   .is-textarea[_ngcontent-%COMP%]::placeholder{color:var(--light-color-700, #95A6B8)}[_nghost-%COMP%]   .is-textarea[_ngcontent-%COMP%]:focus{border-color:var(--primary-color, #3091F6);outline:none;box-shadow:none}[_nghost-%COMP%]   .is-textarea.resize[_ngcontent-%COMP%]{resize:both}[_nghost-%COMP%]   .is-textarea.disabled[_ngcontent-%COMP%]{background:var(--light-color-300, #EAEEF1);opacity:1;resize:none;color:var(--light-color-800, #678099)}[_nghost-%COMP%]   .is-textarea.error[_ngcontent-%COMP%]{border-color:var(--negative-color-200, #F59CB3)}[_nghost-%COMP%]   .is-textarea.error.focused[_ngcontent-%COMP%]{border-color:var(--negative-color-200, #F59CB3)}[_nghost-%COMP%]   .error-msg[_ngcontent-%COMP%]{color:var(--negative-color, #e1174c)}"] }); }
}
(() => { (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 .is-textarea::placeholder,:host .is-textarea{font-size:13px;font-family:var(--regular-font-family, \"Open Sans\");font-weight:400}:host *{box-sizing:border-box}:host .is-textarea.disabled{pointer-events:none;cursor:default;touch-callout:none;-webkit-user-select:none;user-select:none}:host{height:inherit}:host .is-textarea{border-radius:3px;border:1px solid var(--light-color, #E1E6EB);resize:none;width:100%;height:100%;padding:10px;color:var(--dark-color-300, #172D4C);min-height:50px}:host .is-textarea::placeholder{color:var(--light-color-700, #95A6B8)}:host .is-textarea:focus{border-color:var(--primary-color, #3091F6);outline:none;box-shadow:none}:host .is-textarea.resize{resize:both}:host .is-textarea.disabled{background:var(--light-color-300, #EAEEF1);opacity:1;resize:none;color:var(--light-color-800, #678099)}:host .is-textarea.error{border-color:var(--negative-color-200, #F59CB3)}:host .is-textarea.error.focused{border-color:var(--negative-color-200, #F59CB3)}:host .error-msg{color:var(--negative-color, #e1174c)}\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-v1.mjs.map
