<div class="container">

  <div class="row">
    <div class="col-12">
      <ul class="list-unstyled titileLi-w">
        <li class="headingText-w">Admins List</li>
      </ul>
    </div>
  </div>

  <div class="containerContent-w">
    <div class="row">
      <div class="col-12 col-sm-12 col-md-6 col-lg-6 btn-add-delete">
        <button type="button" class="btn btn-outline-success butttonCreate dashButton-w" (click)="onAdding()"><i class="fas fa-plus marginFontAowsome-w"></i> Add New</button>
        <button type="button" class="btn btn-outline-danger butttonDelete dashButton-w" (click)="onDelete()"><i class="fas fa-times marginFontAowsome-w" style="padding-right: 5px"></i>Delete</button>
      </div>
    </div>

    <div class="row"> 
        <div class="col-12 col-sm-12 col-md-12 col-lg-6">
          <div class="form-group">
            <span class="spanSelect-w" style="margin-right:10px;">
                <span class="select-filter-before">Number of Elements:</span>
              <select [ngModel]="dataTableNumber" class="form-control selectButton-w select-filter" (input)="onGetValue($event)">
                <option value="5">5</option>
                <option value="10">10</option>
                <option value="15">15</option>
                <option value="20">20</option>
              </select>
              <!-- <nb-select [ngModel]="dataTableNumber"   placeholder="Cleanable" (input)="onGetValue($event)">
                  <nb-option value="5">5</nb-option>
                  <nb-option value="10">10</nb-option>
                  <nb-option value="15">15</nb-option>
                  <nb-option value="20">20</nb-option>
                </nb-select> -->
            </span>
          </div>
        </div>
        
    </div>

    <table class="table table-bordered table-style" >
      <thead class="headBackground-w">
        <tr>
           <th>
             <div class="custom-control custom-checkbox">
              <!-- <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1"> -->
              <nb-checkbox status="danger" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1"></nb-checkbox>
              </div>
          </th>
          <th> Name </th>
          <th>Type</th>
          <th>Email</th>
          <th>Edit</th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let data of dataList | paginate: { itemsPerPage: perPagePagenation, currentPage: currentPage, totalItems: count }; let i = index "  >
            <td>
            <div class="custom-control custom-checkbox centerIneerItem">
              <!-- <input type="checkbox" class="custom-control-input" id="{{data.id}}" [(ngModel)]="data.selected" [value]='data' (change)="checkIfAllSelected()"> -->
              <!-- <label class="custom-control-label disblayBlock-w" for="{{tab.id}}" style="color:#2a2a2a"></label> -->
              <nb-checkbox status="danger" id="{{data.id}}" [(ngModel)]="data.selected" [value]='data' (change)="checkIfAllSelected()"></nb-checkbox>
            </div>
          </td>
          <td>{{ data.name }}</td>
          <td> {{ data.type }}</td>
          <td>{{ data.email }}</td>
          <td><button type="button" class="btn btn-outline-secondary" (click)="onEdit(data.id)"><i class="fas fa-edit"></i></button></td>
      </tr>
    </tbody>
  </table>

  <pagination-controls  class="pagination-control" nextLabel="Next" previousLabel="Prev" (pageChange)="onPageChange($event)" *ngIf="this.count != 0"></pagination-controls>

  <div class="col-12" *ngIf="this.count == 0" >
    <h2 class="title"> Opps,there's no data to show  </h2>
  </div>
  </div>
</div>

