<h2 mat-dialog-title>{{ titleDialog }}</h2>
<mat-dialog-content class="remove-button-padding-dialog-content">
  <form class="override_content_flex" [formGroup]="formGroup">
    <div class="col-flex-12">
      <mat-form-field appearance="outline">
        <mat-label> Tipo de Condición </mat-label>
        <mat-select formControlName="TIPO_CONDICION">
          @for (condition of arrCondition; track condition) {
            <mat-option [value]="condition">{{ condition }}</mat-option>
          }
        </mat-select>
        <mat-icon matSuffix>fact_check</mat-icon>
      </mat-form-field>
    </div>
    <div class="col-flex-12">
      <mat-form-field appearance="outline">
        <mat-label> Información </mat-label>
        <textarea matInput formControlName="INFORMACION" placeholder="Ingrese la información de la condición seleccionada" maxlength="65535" style="height: 442px; resize: none; overflow: auto;"></textarea>
        <mat-icon matSuffix>subject</mat-icon>
      </mat-form-field>
    </div>
  </form>
</mat-dialog-content>
<mat-dialog-actions align="end">
  <button mat-button [mat-dialog-close]="false" cdkFocusInitial>
    Cerrar
  </button>
  @if (dataDialog.typeDialog === 'REGISTER') {
    <button mat-button cdkFocusInitial [disabled]="formGroup.invalid" (click)="registerCondition()">
      Registrar
    </button>
  }
  @if (dataDialog.typeDialog === 'UPDATE') {
    <button mat-button cdkFocusInitial [disabled]="formGroup.invalid" (click)="updateCondition()">
      Modificar
    </button>
  }
</mat-dialog-actions>
