<ion-header>
  <ion-navbar>
    <ion-buttons start>
      <button ion-button menuToggle>
        <ion-icon name="menu"></ion-icon>
      </button>
    </ion-buttons>
    <ion-title>Games</ion-title>
  </ion-navbar>
</ion-header>


<ion-content padding>

  <ion-searchbar [(ngModel)]="searchTerm" (ionInput)="getItems($event)" placeholder="Search Games"></ion-searchbar>
  <ion-list>
    <ion-item-sliding *ngFor="let game of filteredGames">
      <ion-item>
      <ion-thumbnail item-start>
        <img src="">
      </ion-thumbnail>
      <h2>{{game.name}}</h2>
      <p>{{game.description}}</p>
      <button ion-button clear item-end>View</button>
        </ion-item>


      <ion-item-options side="left">
        <button ion-button color="primary" (click)="doAddToOwnedAndPlayedList()">
          <ion-icon name="add"></ion-icon> Owned and Played
        </button>
      </ion-item-options>

      <ion-item-options side="right">
      <button ion-button color="primary" (click)="doAddToOwnedList()">
      <ion-icon name="add"></ion-icon> Owned
      </button>
        <button ion-button color="secondary" (click)="doAddToPlayedList()">
          <ion-icon name="add"></ion-icon> Played
        </button>
      </ion-item-options>
    </ion-item-sliding>
  </ion-list>
</ion-content>
