<!-- INPUT NORMAL -->
<mat-form-field appearance="outline" class="color-tag" *ngIf="tag === 'input' && type !== 'date' && type !== 'file'" [color]="textError !== '' ? 'warn' : 'primary'">
  <mat-label> {{ label }} </mat-label>
  <input
    matInput
    #valueData
    (keyup)="setValue($event)"
    [type]="type"
    [placeholder]="placeholder"
    [value]="value"
    [id]="id"
    [name]="name"
    [required]="typeForm === 'REG' ? required_reg : required_mod"
    [readonly]="typeForm === 'REG' ? readonly_reg : readonly_mod"
    [disabled]="typeForm === 'REG' ? disabled_reg : disabled_mod"
    [maxLength]="maxLength"
    [pattern]="pattern"
    (keyup)="validatorData(valueData.value, pattern, typeForm === 'REG' ? required_reg : required_mod, msgerror, type)"
  />
  <mat-icon matSuffix *ngIf="icon === ''">{{ icon }}</mat-icon>
  <mat-hint *ngIf="textError !== ''" style="color: red;">{{ textError }}</mat-hint>
</mat-form-field>

<!-- INPUT FILE -->
<div *ngIf="tag === 'input' && type === 'file'" style="width: 100% !important; flex-direction: column; display: inline-flex; padding-bottom: 1.34375em;">
  <div id="yourBtn" (click)="getFile()">
    <mat-icon matSuffix class="mr-5">{{ icon }}</mat-icon> {{ label }}
  </div>
  <input
    type="file"
    value="upload"
    #inputFile
    [disabled]="typeForm === 'REG' ? disabled_reg : disabled_mod"
    [id]="id"
    [name]="name"
    [required]="typeForm === 'REG' ? required_reg : required_mod"
    [accept]="accept_file"
    (change)="sub(inputFile) "/>
</div>

<!-- INPUT DATE -->
<mat-form-field appearance="outline" class="color-tag" *ngIf="tag == 'input' && type === 'date'">
  <mat-label> {{ label }} </mat-label>
  <input #valueDataDate matInput [matDatepicker]="picker" [value]="value" (dateChange)="validatorData(valueDataDate.value, pattern, typeForm === 'REG' ? required_reg : required_mod, msgerror, type)">
  <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
  <mat-datepicker #picker></mat-datepicker>
  <mat-icon matSuffix *ngIf="icon !== null">{{ icon }}</mat-icon>
</mat-form-field>
