import { Component, Input } from '@angular/core';
import { AbstractControl } from '@angular/forms';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@aztrix/icons";
import * as i3 from "@aztrix/helpers";
import * as i4 from "@aztrix/translate";
export class LoginValueFormErrorComponent {
    get errorTypes() {
        return Object.keys(this.form?.errors || {});
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LoginValueFormErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: LoginValueFormErrorComponent, selector: "ax-login-value-form-error", inputs: { form: "form", propertyType: "propertyType" }, ngImport: i0, template: "<div class=\"c-property-edit__error\" *ngIf=\"errorTypes.length\">\n  <ax-icon class=\"icon\" name=\"alert-circle\"></ax-icon>\n  <span>{{\n    errorTypes[0]\n      | errorTranslationKey: propertyType\n      | translate: {propertyType: ('property.' + propertyType + '.label' | translate)}\n  }}</span>\n</div>\n", styles: [".icon{width:.75rem;height:.75rem}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IconComponent, selector: "ax-icon", inputs: ["name", "inline"] }, { kind: "pipe", type: i3.ErrorTranslationKeyPipe, name: "errorTranslationKey" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LoginValueFormErrorComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-login-value-form-error', template: "<div class=\"c-property-edit__error\" *ngIf=\"errorTypes.length\">\n  <ax-icon class=\"icon\" name=\"alert-circle\"></ax-icon>\n  <span>{{\n    errorTypes[0]\n      | errorTranslationKey: propertyType\n      | translate: {propertyType: ('property.' + propertyType + '.label' | translate)}\n  }}</span>\n</div>\n", styles: [".icon{width:.75rem;height:.75rem}\n"] }]
        }], propDecorators: { form: [{
                type: Input
            }], propertyType: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9naW4tdmFsdWUtZm9ybS1lcnJvci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvbG9naW4tdmFsdWUtZm9ybS1lcnJvci9sb2dpbi12YWx1ZS1mb3JtLWVycm9yLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9sb2dpbi12YWx1ZS1mb3JtLWVycm9yL2xvZ2luLXZhbHVlLWZvcm0tZXJyb3IuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxLQUFLLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDL0MsT0FBTyxFQUFDLGVBQWUsRUFBQyxNQUFNLGdCQUFnQixDQUFDOzs7Ozs7QUFRL0MsTUFBTSxPQUFPLDRCQUE0QjtJQUl2QyxJQUFJLFVBQVU7UUFDWixPQUFPLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksRUFBRSxNQUFNLElBQUksRUFBRSxDQUFDLENBQUM7SUFDOUMsQ0FBQzsrR0FOVSw0QkFBNEI7bUdBQTVCLDRCQUE0Qix5SENUekMseVRBUUE7OzRGRENhLDRCQUE0QjtrQkFMeEMsU0FBUzsrQkFDRSwyQkFBMkI7OEJBSzVCLElBQUk7c0JBQVosS0FBSztnQkFDRyxZQUFZO3NCQUFwQixLQUFLIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtDb21wb25lbnQsIElucHV0fSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7QWJzdHJhY3RDb250cm9sfSBmcm9tICdA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