import { Component, ElementRef, forwardRef, Injector, ViewEncapsulation } from '@angular/core';
import { NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatTooltipModule } from '@angular/material/tooltip';
import { OMatErrorDirective } from '../../../directives/o-mat-error.directive';
import { OTranslatePipe } from '../../../pipes/o-translate.pipe';
import { OValidators } from '../../../validators/o-validators';
import { OTextInputComponent } from '../text-input/o-text-input.component';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@angular/material/form-field";
import * as i3 from "@angular/material/input";
import * as i4 from "@angular/material/button";
import * as i5 from "@angular/material/icon";
import * as i6 from "@angular/material/tooltip";
export class OEmailInputComponent extends OTextInputComponent {
    constructor(elRef, injector) {
        super(elRef, injector);
    }
    resolveValidators() {
        const validators = super.resolveValidators();
        validators.push(OValidators.emailValidator);
        return validators;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OEmailInputComponent, deps: [{ token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: OEmailInputComponent, isStandalone: true, selector: "o-email-input", providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => OEmailInputComponent), multi: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-flex-row o-layout-align-sb-center\" [formGroup]=\"getFormGroup()\" [matTooltip]=\"tooltip\" [matTooltipClass]=\"tooltipClass\"\n  [matTooltipPosition]=\"tooltipPosition\" [matTooltipShowDelay]=\"tooltipShowDelay\" [matTooltipHideDelay]=\"tooltipHideDelay\">\n  <mat-form-field [appearance]=\"appearance\" [floatLabel]=\"floatLabel\" [hideRequiredMarker]=\"hideRequiredMarker\" [class.custom-width]=\"hasCustomWidth\"\n    class=\"icon-field o-flex-fill\" [subscriptSizing]=\"subscriptSizing\">\n    @if (labelVisible) {\n      <mat-label>{{ olabel | oTranslate }}</mat-label>\n    }\n    <input matInput type=\"email\" [id]=\"getAttribute()\" [formControlName]=\"getAttribute()\" [placeholder]=\"placeHolder\" (focus)=\"innerOnFocus($event)\"\n      (blur)=\"innerOnBlur($event)\" [readonly]=\"isReadOnly\" [required]=\"isRequired\" (change)=\"onChangeEvent($event)\" [maxlength]=\"maxLength\"\n      [minlength]=\"minLength\">\n      @if (showClearButton) {\n        <button type=\"button\" matSuffix mat-icon-button (click)=\"onClickClearValue($event)\">\n          <mat-icon>close</mat-icon>\n        </button>\n      }\n      <mat-icon matSuffix [class.mat-disabled]=\"!enabled\">mail</mat-icon>\n      <mat-error *oMatError=\"hasError('required')\">\n        {{ 'FORM_VALIDATION.REQUIRED' | oTranslate }}\n      </mat-error>\n      <mat-error *oMatError=\"hasError('minlength')\">\n        {{ 'FORM_VALIDATION.MIN_LENGTH' | oTranslate }}: {{ getErrorValue('minlength', 'requiredLength') }}\n      </mat-error>\n      <mat-error *oMatError=\"hasError('maxlength')\">\n        {{ 'FORM_VALIDATION.MAX_LENGTH' | oTranslate }}: {{ getErrorValue('maxlength', 'requiredLength') }}\n      </mat-error>\n      <mat-error *oMatError=\"hasError('invalidEmailAddress')\">\n        {{ 'FORM_VALIDATION.EMAIL_FORMAT' | oTranslate }}\n      </mat-error>\n      @for (oError of getActiveOErrors(); track oError) {\n        <mat-error>\n          {{ oError.text | oTranslate }}\n        </mat-error>\n      }\n    </mat-form-field>\n  </div>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", 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]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: OMatErrorDirective, selector: "[oMatError]", inputs: ["oMatError"] }, { kind: "pipe", type: OTranslatePipe, name: "oTranslate" }], encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OEmailInputComponent, decorators: [{
            type: Component,
            args: [{ standalone: true, imports: [ReactiveFormsModule, MatFormFieldModule, MatInputModule, MatButtonModule, MatIconModule, MatTooltipModule, OMatErrorDirective, OTranslatePipe], selector: 'o-email-input', encapsulation: ViewEncapsulation.None, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => OEmailInputComponent), multi: true }], template: "<div class=\"o-flex-row o-layout-align-sb-center\" [formGroup]=\"getFormGroup()\" [matTooltip]=\"tooltip\" [matTooltipClass]=\"tooltipClass\"\n  [matTooltipPosition]=\"tooltipPosition\" [matTooltipShowDelay]=\"tooltipShowDelay\" [matTooltipHideDelay]=\"tooltipHideDelay\">\n  <mat-form-field [appearance]=\"appearance\" [floatLabel]=\"floatLabel\" [hideRequiredMarker]=\"hideRequiredMarker\" [class.custom-width]=\"hasCustomWidth\"\n    class=\"icon-field o-flex-fill\" [subscriptSizing]=\"subscriptSizing\">\n    @if (labelVisible) {\n      <mat-label>{{ olabel | oTranslate }}</mat-label>\n    }\n    <input matInput type=\"email\" [id]=\"getAttribute()\" [formControlName]=\"getAttribute()\" [placeholder]=\"placeHolder\" (focus)=\"innerOnFocus($event)\"\n      (blur)=\"innerOnBlur($event)\" [readonly]=\"isReadOnly\" [required]=\"isRequired\" (change)=\"onChangeEvent($event)\" [maxlength]=\"maxLength\"\n      [minlength]=\"minLength\">\n      @if (showClearButton) {\n        <button type=\"button\" matSuffix mat-icon-button (click)=\"onClickClearValue($event)\">\n          <mat-icon>close</mat-icon>\n        </button>\n      }\n      <mat-icon matSuffix [class.mat-disabled]=\"!enabled\">mail</mat-icon>\n      <mat-error *oMatError=\"hasError('required')\">\n        {{ 'FORM_VALIDATION.REQUIRED' | oTranslate }}\n      </mat-error>\n      <mat-error *oMatError=\"hasError('minlength')\">\n        {{ 'FORM_VALIDATION.MIN_LENGTH' | oTranslate }}: {{ getErrorValue('minlength', 'requiredLength') }}\n      </mat-error>\n      <mat-error *oMatError=\"hasError('maxlength')\">\n        {{ 'FORM_VALIDATION.MAX_LENGTH' | oTranslate }}: {{ getErrorValue('maxlength', 'requiredLength') }}\n      </mat-error>\n      <mat-error *oMatError=\"hasError('invalidEmailAddress')\">\n        {{ 'FORM_VALIDATION.EMAIL_FORMAT' | oTranslate }}\n      </mat-error>\n      @for (oError of getActiveOErrors(); track oError) {\n        <mat-error>\n          {{ oError.text | oTranslate }}\n        </mat-error>\n      }\n    </mat-form-field>\n  </div>\n" }]
        }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Injector }] });
//# sourceMappingURL=data:application/json;base64, 