import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ReactiveFormsModule } from '@angular/forms';
import { InputTextarea } from 'primeng/inputtextarea';
import { DynamicFieldWrapperComponent } from './dynamic-field-wrapper.component';
import { DynamicFieldBaseComponent } from './dynamic-field-base.component';
import * as i0 from "@angular/core";
import * as i1 from "../../../services/translation.service";
import * as i2 from "@angular/forms";
export class DynamicFieldTextareaComponent extends DynamicFieldBaseComponent {
    constructor(translationService) {
        super(translationService);
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DynamicFieldTextareaComponent, deps: [{ token: i1.TranslationService }], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: DynamicFieldTextareaComponent, isStandalone: true, selector: "sia-dynamic-field-textarea", usesInheritance: true, ngImport: i0, template: `
    <sia-dynamic-field-wrapper [field]="field" [form]="form" [mode]="mode">
      <div [formGroup]="form">
        <textarea
          pInputTextarea
          [id]="field.field"
          [formControlName]="field.field"
          [placeholder]="getPlaceholder()"
          [rows]="field.rows || 3"
          [maxlength]="field.maxLength || 524288"
          [class.ng-invalid]="isFieldInvalid()"
          [class.ng-dirty]="isFieldDirty()">
        </textarea>
      </div>
    </sia-dynamic-field-wrapper>
  `, isInline: true, styles: ["textarea{width:100%;resize:vertical}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant", "fluid"], outputs: ["onResize"] }, { kind: "component", type: DynamicFieldWrapperComponent, selector: "sia-dynamic-field-wrapper", inputs: ["field", "form", "mode"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DynamicFieldTextareaComponent, decorators: [{
            type: Component,
            args: [{ selector: 'sia-dynamic-field-textarea', standalone: true, imports: [
                        CommonModule,
                        ReactiveFormsModule,
                        InputTextarea,
                        DynamicFieldWrapperComponent
                    ], template: `
    <sia-dynamic-field-wrapper [field]="field" [form]="form" [mode]="mode">
      <div [formGroup]="form">
        <textarea
          pInputTextarea
          [id]="field.field"
          [formControlName]="field.field"
          [placeholder]="getPlaceholder()"
          [rows]="field.rows || 3"
          [maxlength]="field.maxLength || 524288"
          [class.ng-invalid]="isFieldInvalid()"
          [class.ng-dirty]="isFieldDirty()">
        </textarea>
      </div>
    </sia-dynamic-field-wrapper>
  `, styles: ["textarea{width:100%;resize:vertical}\n"] }]
        }], ctorParameters: () => [{ type: i1.TranslationService }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHluYW1pYy1maWVsZC10ZXh0YXJlYS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzLWFpL3NyYy9saWIvY29tcG9uZW50cy9keW5hbWljLWZvcm0vZmllbGRzL2R5bmFtaWMtZm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