import { Component, Input } from '@angular/core';
import { GlobalInjector } from '../../../../common/services/global-injector';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "primeng/tooltip";
import * as i3 from "../../../../common/data-pipes/pipes/describe-array.pipe";
import * as i4 from "../../../../common/data-pipes/pipes/join.pipe";
import * as i5 from "./validation-messages.pipe";
export class ValidationMessagesComponent {
    constructor() {
        this.extraMessages = [];
        this.uiConfig = GlobalInjector.config;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ValidationMessagesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: ValidationMessagesComponent, selector: "smz-validation-messages", inputs: { input: "input", control: "control", behaviors: "behaviors", extraMessages: "extraMessages" }, ngImport: i0, template: "<ng-container *ngIf=\"behaviors?.showErrorsMethod != null ? control[behaviors.showErrorsMethod] : control[uiConfig.dialogs.forms.behaviors.showErrorsMethod]\">\r\n<ng-container *ngIf=\"(control.errors | validationMessages : input.advancedSettings?.validationMessages) as formMessages\">\r\n\r\n    <ng-container *ngIf=\"formMessages | join : extraMessages as messages\">\r\n\r\n        <ng-container *ngIf=\"messages.length === 1\">\r\n            <ng-container *ngFor=\"let message of messages\">\r\n                <span class=\"col-12 error-message\">{{ message }}</span>\r\n            </ng-container>\r\n        </ng-container>\r\n\r\n        <ng-container *ngIf=\"messages.length > 1\">\r\n            <ng-container *ngIf=\"behaviors.showMultipleErrorMessages\">\r\n                <span class=\"col-12 error-message asterisk\">{{ messages | describeArray }}</span>\r\n            </ng-container>\r\n            <ng-container *ngIf=\"!behaviors.showMultipleErrorMessages\">\r\n                <span class=\"col-12 error-message asterisk\" [pTooltip]=\"messages | describeArray\">{{ uiConfig.dialogs.forms.multipleErrorMessagesLabel }} *</span>\r\n            </ng-container>\r\n        </ng-container>\r\n\r\n    </ng-container>\r\n</ng-container>\r\n</ng-container>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: i3.DescribeArrayPipe, name: "describeArray" }, { kind: "pipe", type: i4.JoinPipe, name: "join" }, { kind: "pipe", type: i5.ValidationMessagesPipe, name: "validationMessages" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ValidationMessagesComponent, decorators: [{
            type: Component,
            args: [{ selector: 'smz-validation-messages', template: "<ng-container *ngIf=\"behaviors?.showErrorsMethod != null ? control[behaviors.showErrorsMethod] : control[uiConfig.dialogs.forms.behaviors.showErrorsMethod]\">\r\n<ng-container *ngIf=\"(control.errors | validationMessages : input.advancedSettings?.validationMessages) as formMessages\">\r\n\r\n    <ng-container *ngIf=\"formMessages | join : extraMessages as messages\">\r\n\r\n        <ng-container *ngIf=\"messages.length === 1\">\r\n            <ng-container *ngFor=\"let message of messages\">\r\n                <span class=\"col-12 error-message\">{{ message }}</span>\r\n            </ng-container>\r\n        </ng-container>\r\n\r\n        <ng-container *ngIf=\"messages.length > 1\">\r\n            <ng-container *ngIf=\"behaviors.showMultipleErrorMessages\">\r\n                <span class=\"col-12 error-message asterisk\">{{ messages | describeArray }}</span>\r\n            </ng-container>\r\n            <ng-container *ngIf=\"!behaviors.showMultipleErrorMessages\">\r\n                <span class=\"col-12 error-message asterisk\" [pTooltip]=\"messages | describeArray\">{{ uiConfig.dialogs.forms.multipleErrorMessagesLabel }} *</span>\r\n            </ng-container>\r\n        </ng-container>\r\n\r\n    </ng-container>\r\n</ng-container>\r\n</ng-container>" }]
        }], propDecorators: { input: [{
                type: Input
            }], control: [{
                type: Input
            }], behaviors: [{
                type: Input
            }], extraMessages: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGlvbi1tZXNzYWdlcy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc216LXVpL3NyYy9saWIvbW9kdWxlcy9zbXotZm9ybXMvY29tcG9uZW50cy92YWxpZGF0aW9uLW1lc3NhZ2VzL3ZhbGlkYXRpb24tbWVzc2FnZXMuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNtei11aS9zcmMvbGliL21vZHVsZXMvc216LWZvcm1zL2NvbXBvbmVudHMvdmFsaWRhdGlvbi1tZXNzYWdlcy92YWxpZGF0aW9uLW1lc3NhZ2VzLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBSWpELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSw2Q0FBNkMsQ0FBQzs7Ozs7OztBQU03RSxNQUFNLE9BQU8sMkJBQTJCO0lBSnhDO1FBUW9CLGtCQUFhLEdBQWEsRUFBRSxDQUFDO1FBQ3RDLGFBQVEsR0FBRyxjQUFjLENBQUMsTUFBTSxDQUFDO0tBQzNDOzhHQU5ZLDJCQUEyQjtrR0FBM0IsMkJBQTJCLHVLQ1Z4QywwdkNBc0JlOzsyRkRaRiwyQkFBMkI7a0JBSnZDLFNBQVM7K0JBQ0kseUJBQXlCOzhCQ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