<ion-header  class="ion-no-border">
  <ion-toolbar class="header-toolbar">
    <div class="main-header">
      <div class="title-content">
        <div class="back-icon cursor-pointer">
          <button class="btn-no-color" (click)="close()">
            <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
            <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
          </button>
        </div>
        <div class="div-title">
          <ion-label class="title">Contactos</ion-label>
        </div>
        <app-btn-seguinte (click)="groupMessages()" class="cursor-pointer"></app-btn-seguinte>
      </div>
    </div>
  </ion-toolbar>
  <ion-toolbar class="toolbar-search">
    <div class="search">
      <ion-searchbar (ionChange)="onChange($event)" placeholder="Pesquisar por contacto" ></ion-searchbar>
    </div>
  </ion-toolbar>
</ion-header>

<ion-content>
  <ion-refresher  name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
      <ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
      <ion-refresher-content>
      </ion-refresher-content>
    </ion-refresher>
  <div class="main-content">

    <!-- <ion-list>
      <ion-item *ngFor="let user of searchedItem">
        {{user.name}}
      </ion-item>
    </ion-list> -->

    <ion-virtual-scroll [items]="users" approxItemHeight="70px" [headerFn]="separateLetter">

      <div class="item-divider" *virtualHeader="let header">
        <ion-label>{{header}}</ion-label>
      </div>

      <div *virtualItem="let user" class="item-checkbox">
        <ion-checkbox color="primary"></ion-checkbox>
         <p>{{user.first}} {{user.last}}</p>
        <ion-icon name="ellipse"></ion-icon>
      </div>

    </ion-virtual-scroll>

  </div>
</ion-content>


