<ion-header>
    <ion-navbar>
        <button ion-button menuToggle>
            <ion-icon name="menu"></ion-icon>
        </button>
        <ion-title>Productos</ion-title>
    </ion-navbar>
</ion-header>
<ion-content>
    <ion-list [virtualScroll]="getItems()" approxItemHeight="97px">
		<ion-item *virtualItem="let item" (doubleTap)="openOptions(item)" [ngClass]="{ 'selected-item': item === getSelectedItem() }">
			<ion-thumbnail item-left>
                <img src="./assets/images/product.png" *ngIf="!item.image_medium"/>
				<img [src]="item.image_medium | sanitizeUrl" *ngIf="item.image_medium"/>
			</ion-thumbnail>
			<h2>{{ item.name }}</h2>
			<p>
				<strong>Precio:</strong>
				{{ item.list_price }}
			</p>
            <p>
				<strong>Cantidad:</strong>
				{{ item.qty_available }}
			</p>
		</ion-item>
	</ion-list>
	<ion-fab right bottom>
        <button ion-fab (click)="goToDetails()">
            <ion-icon name="add"></ion-icon>
        </button>
    </ion-fab>
</ion-content>
