import { Component } from '@angular/core';
import { DefaultEditorDirective } from '../../../lib/editor-cell-default';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "../../../../popover/popover.component";
import * as i3 from "@angular/common";
import * as i4 from "@ngx-translate/core";
export class TextareaEditorComponent extends DefaultEditorDirective {
    constructor() {
        super();
    }
}
TextareaEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TextareaEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
TextareaEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TextareaEditorComponent, selector: "textarea-editor", usesInheritance: true, ngImport: i0, template: `
        <div class="form-cell form-editor-textarea" [formGroup]="editingFormGroup">
            <textarea
                class="form-control slds-input"
                [placeholder]="cell.column.title | translate"

                [formControlName]="cell.column.id"
                (input)="cell.newValue = $event.target.value;"
                [name]="cell.column.id"

                (click)="onClick.emit($event)"
                (keydown.enter)="onEdited.emit($event)"
                (keydown.esc)="onStopEditing.emit()"

                uno-popover-trigger
                [unoPopover]="formErrorsContent"
                [unoPopoverOpen]="openValidatorPopover"
                unoPopoverSize="small"
                unoPopoverTooltip="true"
                [unoPopoverTheme]="cell.column.editor?.inputPopoverTheme || 'info'">
            </textarea>
        </div>

        <!-- This Controller's Input Validator errors: -->
        <ng-template #formErrorsContent>
            <ng-container *ngFor="let errors of errorsData">
                <ng-container *ngIf="errors.input === cell.column.id">
                    <div *ngFor="let strError of errors.translated">
                        {{ strError }}
                    </div>
                </ng-container>
            </ng-container>
        </ng-template>
    `, isInline: true, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}:host input.form-control.ng-invalid.ng-touched,:host textarea.form-control.ng-invalid.ng-touched{border:1px solid var(--vermillion)}:host input.form-control.ng-valid.ng-touched:not(.no-validator),:host textarea.form-control.ng-valid.ng-touched:not(.no-validator){border:none}.line-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:normal;overflow:hidden}.view-default-expanded{text-align:justify;word-wrap:break-word}\n"], directives: [{ type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.PopoverTriggerDirective, selector: "[uno-popover-trigger]", inputs: ["unoPopover", "unoPopoverHeader", "unoPopoverFooter", "unoPopoverTemplate", "unoPopoverTemplateData", "hasEdit", "hasDelete", "infoTitle", "infoCreatedBy", "infoModifiedBy", "infoDate", "unoPopoverPlacement", "unoPopoverTheme", "unoPopoverNubbin", "unoPopoverSize", "unoPopoverTooltip", "unoPopoverDelay", "unoPopoverInteractive", "unoPopoverOpen"], outputs: ["unoPopoverToggled", "unoPopoverTemplateEvent"], exportAs: ["unoPopoverTrigger"] }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i4.TranslatePipe } });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TextareaEditorComponent, decorators: [{
            type: Component,
            args: [{ selector: 'textarea-editor', template: `
        <div class="form-cell form-editor-textarea" [formGroup]="editingFormGroup">
            <textarea
                class="form-control slds-input"
                [placeholder]="cell.column.title | translate"

                [formControlName]="cell.column.id"
                (input)="cell.newValue = $event.target.value;"
                [name]="cell.column.id"

                (click)="onClick.emit($event)"
                (keydown.enter)="onEdited.emit($event)"
                (keydown.esc)="onStopEditing.emit()"

                uno-popover-trigger
                [unoPopover]="formErrorsContent"
                [unoPopoverOpen]="openValidatorPopover"
                unoPopoverSize="small"
                unoPopoverTooltip="true"
                [unoPopoverTheme]="cell.column.editor?.inputPopoverTheme || 'info'">
            </textarea>
        </div>

        <!-- This Controller's Input Validator errors: -->
        <ng-template #formErrorsContent>
            <ng-container *ngFor="let errors of errorsData">
                <ng-container *ngIf="errors.input === cell.column.id">
                    <div *ngFor="let strError of errors.translated">
                        {{ strError }}
                    </div>
                </ng-container>
            </ng-container>
        </ng-template>
    `, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}:host input.form-control.ng-invalid.ng-touched,:host textarea.form-control.ng-invalid.ng-touched{border:1px solid var(--vermillion)}:host input.form-control.ng-valid.ng-touched:not(.no-validator),:host textarea.form-control.ng-valid.ng-touched:not(.no-validator){border:none}.line-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:normal;overflow:hidden}.view-default-expanded{text-align:justify;word-wrap:break-word}\n"] }]
        }], ctorParameters: function () { return []; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dGFyZWEtZWRpdG9yLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3Vuby11aS1saWIvc3JjL2xpYi90YWJsZS9jb21wb25lbnRzL2NlbGwvY2VsbC1lZGl0b3JzL3RleHRhcmVhLWVkaXRvci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUxQyxPQUFPLEVBQUUsc0JBQXNCLEV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m1Db250cm9sTmFtZV09XCJjZWxsLmNvbHVtbi5pZFwiXHJcbiAgICAgICAgICAgICAgICAoaW5wdXQpPVwiY2VsbC5uZXdWYWx1ZSA9ICRldmVudC50YXJnZXQudmFsdWU7XCJcclxuICAgICAgICAgICAgICAgIFtuYW1lXT1cImNlbGwuY29sdW1uLmlkXCJcclxuXHJcbiAgICAgICAgICAgICAgICAoY2xpY2spPVwib25DbGljay5lbWl0KCRldmVudClcIlxyXG4gICAgICAgICAgICAgICAgKGtleWRvd24uZW50ZXIpPVwib25FZGl0ZWQuZW1pdCgkZXZlbnQpXCJcclxuICAgICAgICAgICAgICAgIChrZXlkb3duLmVzYyk9XCJvblN0b3BFZGl0aW5nLmVtaXQoKVwiXHJcblxyXG4gICAgICAgICAgICAgICAgdW5vLXBvcG92ZXItdHJpZ2dlclxyXG4gICAgICAgICAgICAgICAgW3Vub1BvcG92ZXJdPVwiZm9ybUVycm9yc0NvbnRlbnRcIlxyXG4gICAgICAgICAgICAgICAgW3Vub1BvcG92ZXJPcGVuXT1cIm9wZW5WYWxpZGF0b3JQb3BvdmVyXCJcclxuICAgICAgICAgICAgICAgIHVub1BvcG92ZXJTaXplPVwic21hbGxcIlxyXG4gICAgICAgICAgICAgICAgdW5vUG9wb3ZlclRvb2x0aXA9XCJ0cnVlXCJcclxuICAgICAgICAgICAgICAgIFt1bm9Qb3BvdmVyVGhlbWVdPVwiY2VsbC5jb2x1bW4uZWRpdG9yPy5pbnB1dFBvcG92ZXJUaGVtZSB8fCAnaW5mbydcIj5cclxuICAgICAgICAgICAgPC90ZXh0YXJlYT5cclxuICAgICAgICA8L2Rpdj5cclxuXHJcbiAgICAgICAgPCEtLSBUaGlzIENvbnRyb2xsZXIncyBJbnB1dCBWYWxpZGF0b3IgZXJyb3JzOiAtLT5cclxuICAgICAgICA8bmctdGVtcGxhdGUgI2Zvcm1FcnJvcnNDb250ZW50PlxyXG4gICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0Zvcj1cImx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