<div class="console-app__users-table-wrapper">
  <mat-table
    [dataSource]="dataSource"
    class="mat-elevation-z0"
    class="console-app__users-table"
    matSort
  >
    @for (column of columns; track column) {
    <ng-container [matColumnDef]="column.columnDef">
      <mat-header-cell *matHeaderCellDef>
        {{ column.header }}
      </mat-header-cell>
      <mat-cell *matCellDef="let row">{{ column.cell(row) }}</mat-cell>
    </ng-container>
    }
    <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
    <mat-row
      *matRowDef="let row; columns: displayedColumns"
      [class.rowSelected]="isRowSelected(row)"
      (click)="onClick(row)"
      (keyup.enter)="onClick(row)"
      tabindex="0"
    ></mat-row>
  </mat-table>
</div>
