<div class="row users-container">
  <div class="table-responsive">
    <table class="table table-bordered admin-table">
      <thead>
        <tr>
          <th *ngFor="let header of data.headers">{{ header }}</th>
          <th>Action</th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let row of data.rows; let index = index">
          <td *ngFor="let field of row">{{ field }}</td>
          <td class="actions">
            <mat-icon id="icon-edit" (click)="editItem(index)">edit</mat-icon>
            <mat-icon id="icon-delete" (click)="deleteIndex = index" data-toggle="modal" data-target="#confirmDialog">delete</mat-icon>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>

<app-dialog [title]="data.dialogData.title" [text]="data.dialogData.text" (confirm)="confirmDelete()"></app-dialog>

