/**
 * al-form-group-errors
 *
 * @author Rob Parker <robert.parker@alertlogic.com>
 *
 * @copyright Alert Logic, Inc 2021
 *
 */
import { Component, Input } from '@angular/core';
import { AbstractControl } from '@angular/forms';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
function AlFormGroupErrorsComponent_div_0_ng_container_5_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1("", ctx_r7.label, " is required.");
} }
function AlFormGroupErrorsComponent_div_0_ng_container_5_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r8.requiredError);
} }
function AlFormGroupErrorsComponent_div_0_ng_container_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, AlFormGroupErrorsComponent_div_0_ng_container_5_div_1_Template, 2, 1, "div", 5);
    i0.ɵɵtemplate(2, AlFormGroupErrorsComponent_div_0_ng_container_5_div_2_Template, 2, 1, "div", 5);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !ctx_r1.requiredError);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.requiredError);
} }
function AlFormGroupErrorsComponent_div_0_ng_container_6_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r9 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1("", ctx_r9.label, " does not meet the defined pattern.");
} }
function AlFormGroupErrorsComponent_div_0_ng_container_6_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r10 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r10.patternError);
} }
function AlFormGroupErrorsComponent_div_0_ng_container_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, AlFormGroupErrorsComponent_div_0_ng_container_6_div_1_Template, 2, 1, "div", 5);
    i0.ɵɵtemplate(2, AlFormGroupErrorsComponent_div_0_ng_container_6_div_2_Template, 2, 1, "div", 5);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !ctx_r2.patternError);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.patternError);
} }
function AlFormGroupErrorsComponent_div_0_ng_container_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div");
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2("", ctx_r3.label, " should contain minimum ", ctx_r3.control.errors.minlength.requiredLength, " characters.");
} }
function AlFormGroupErrorsComponent_div_0_ng_container_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div");
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2("", ctx_r4.label, " should contain maximum ", ctx_r4.control.errors.maxlength.requiredLength, " characters.");
} }
function AlFormGroupErrorsComponent_div_0_ng_container_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div");
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2("", ctx_r5.label, " should be no more than ", ctx_r5.control.errors.max.max, ".");
} }
function AlFormGroupErrorsComponent_div_0_ng_container_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div");
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2("", ctx_r6.label, " should be at least ", ctx_r6.control.errors.min.min, ".");
} }
function AlFormGroupErrorsComponent_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 1);
    i0.ɵɵelementStart(1, "div", 2);
    i0.ɵɵelementStart(2, "i", 3);
    i0.ɵɵtext(3, "error");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 4);
    i0.ɵɵtemplate(5, AlFormGroupErrorsComponent_div_0_ng_container_5_Template, 3, 2, "ng-container", 5);
    i0.ɵɵtemplate(6, AlFormGroupErrorsComponent_div_0_ng_container_6_Template, 3, 2, "ng-container", 5);
    i0.ɵɵtemplate(7, AlFormGroupErrorsComponent_div_0_ng_container_7_Template, 3, 2, "ng-container", 5);
    i0.ɵɵtemplate(8, AlFormGroupErrorsComponent_div_0_ng_container_8_Template, 3, 2, "ng-container", 5);
    i0.ɵɵtemplate(9, AlFormGroupErrorsComponent_div_0_ng_container_9_Template, 3, 2, "ng-container", 5);
    i0.ɵɵtemplate(10, AlFormGroupErrorsComponent_div_0_ng_container_10_Template, 3, 2, "ng-container", 5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngIf", ctx_r0.control.errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.control.errors.pattern);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.control.errors.minlength);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.control.errors.maxlength);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.control.errors.max);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.control.errors.min);
} }
export class AlFormGroupErrorsComponent {
    constructor() {
        this.label = '';
    }
}
/** @nocollapse */ AlFormGroupErrorsComponent.ɵfac = function AlFormGroupErrorsComponent_Factory(t) { return new (t || AlFormGroupErrorsComponent)(); };
/** @nocollapse */ AlFormGroupErrorsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlFormGroupErrorsComponent, selectors: [["al2-form-group-errors"]], inputs: { control: "control", label: "label", requiredError: "requiredError", validationPattern: "validationPattern", patternError: "patternError", minValue: "minValue", maxValue: "maxValue", minLength: "minLength", maxLength: "maxLength" }, decls: 1, vars: 1, consts: [["class", "ald-error-message", 4, "ngIf"], [1, "ald-error-message"], [1, "ald-error-message__icon"], [1, "material-icons"], [1, "ald-error-message__text"], [4, "ngIf"]], template: function AlFormGroupErrorsComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, AlFormGroupErrorsComponent_div_0_Template, 11, 6, "div", 0);
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", ctx.control && ctx.control.errors && (ctx.control.dirty || ctx.control.touched));
    } }, directives: [i1.NgIf], encapsulation: 2 });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AlFormGroupErrorsComponent, [{
        type: Component,
        args: [{
                selector: 'al2-form-group-errors',
                templateUrl: './al-form-group-errors.component.html'
            }]
    }], function () { return []; }, { control: [{
            type: Input
        }], label: [{
            type: Input
        }], requiredError: [{
            type: Input
        }], validationPattern: [{
            type: Input
        }], patternError: [{
            type: Input
        }], minValue: [{
            type: Input
        }], maxValue: [{
            type: Input
        }], minLength: [{
            type: Input
        }], maxLength: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 