<h2 mat-dialog-title>{{ type === 'REG' ? 'Registro' : 'Modificación' }}  de Detalles</h2>
<mat-dialog-content [formGroup]="formGroup">

  <mat-grid-list cols="12" rowHeight="82px">
    <mat-grid-tile colspan="12">
      <mat-form-field appearance="outline">
        <mat-label>Código</mat-label>
        <input matInput type="text" formControlName="CODIGO">
      </mat-form-field>
    </mat-grid-tile>
    <mat-grid-tile colspan="12">
      <mat-form-field appearance="outline">
        <mat-label>Modelo</mat-label>
        <input matInput type="text" formControlName="MODELO">
      </mat-form-field>
    </mat-grid-tile>
    <mat-grid-tile colspan="12">
      <mat-form-field appearance="outline">
        <mat-label>Cantidad</mat-label>
        <input matInput type="number" formControlName="CANTIDAD">
      </mat-form-field>
    </mat-grid-tile>
    <mat-grid-tile colspan="6">
      <mat-form-field appearance="outline">
        <mat-label>Moneda</mat-label>
        <!-- <mat-select formControlName="MONEDA">
          <mat-option value="MXN" *ngFor="let element of arrCatalogoMonedas" [value]="element">{{ element.moneda }}</mat-option>
        </mat-select> -->

        <input type="text" matInput formControlName="MONEDA" [matAutocomplete]="auto">
        <mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn">
          <mat-option *ngFor="let option of filteredOptions | async" [value]="option">
            {{ option.moneda }}
          </mat-option>
        </mat-autocomplete>

      </mat-form-field>
    </mat-grid-tile>
    <mat-grid-tile colspan="6">
      <mat-form-field appearance="outline">
        <mat-label>Precio</mat-label>
        <input matInput type="number" formControlName="PRECIO">
        <span matTextPrefix>$&nbsp;</span>
      </mat-form-field>
    </mat-grid-tile>

    <mat-grid-tile colspan="12" rowspan="2">
      <mat-form-field appearance="outline">
        <mat-label>Características</mat-label>
        <textarea matInput type="text" formControlName="CARACTERISTICAS" style="height: 107px; resize: none;"></textarea>
      </mat-form-field>
    </mat-grid-tile>

  </mat-grid-list>
</mat-dialog-content>
<mat-dialog-actions align="end">
  <button mat-button class="red_primary_font" cdkFocusInitial (click)="openDialog('CLO')">Cancelar</button>
  <button mat-button class="green_primary_font" [disabled]="formGroup.invalid" (click)="openDialog(type)">
    {{ type === 'REG' ? 'Registrar' : 'Modificar' }}
  </button>
</mat-dialog-actions>
