<ion-header>
  <ion-toolbar>
    <ion-menu-button slot="start">
      <ion-icon name="menu"></ion-icon>
    </ion-menu-button>
    <ion-title>
      <ion-img src="assets/logo_header-4.png" alt="logo"></ion-img>
    </ion-title>
    <ion-buttons slot="end">
      <ion-button fill="clear" routerLink="/search" routerDirection="forward">
        <ion-icon slot="icon-only" name="search"></ion-icon>
      </ion-button>
      <ion-button fill="clear" routerLink="/cart" routerDirection="forward">
        <ion-icon name="basket"></ion-icon>
        <ion-badge color="secondary">{{shared.cartTotalItems()}}</ion-badge>
      </ion-button>
    </ion-buttons>
  </ion-toolbar>
</ion-header>

<ion-content>
  <app-banner></app-banner>
  <!-- categories swipe slider -->
  <ion-row class="top-icon-header">
    <ion-button fill="clear">
      <ion-icon slot="start" name="apps"></ion-icon>
      {{'Categories' | translate }}
    </ion-button>
    <ion-button id="second" fill="clear" (click)="openCategoryPage()">
      <ion-icon slot="end" name="arrow-dropright"></ion-icon>
      {{ 'Shop More' | translate }}
    </ion-button>
  </ion-row>
  <!-- categories component -->
  <app-categories [type]="'withName'"></app-categories>
  <!-- On Sale Header -->
  <ion-row class="top-icon-header">
    <ion-button fill="clear">
      <ion-icon slot="start" name="md-bookmark"></ion-icon>
      {{'On Sale' | translate }}
    </ion-button>
    <ion-button id="second" fill="clear" (click)="openProducts('sale')">
      <ion-icon slot="end" name="arrow-dropright"></ion-icon>
      {{ 'Shop More' | translate }}
    </ion-button>
  </ion-row>
  <!-- On Sale Products swipe slider -->
  <ion-slides [options]="sliderConfig">
    <ion-slide *ngFor="let p of shared.tab2">
      <app-product [data]="p" [type]="'normal'"></app-product>
    </ion-slide>
  </ion-slides>
  <!-- For Vendor List -->
  <app-vendor-list></app-vendor-list>
  <!-- banner image -->
  <ion-img *ngIf="shared.banners.length!=0" src="{{shared.banners[shared.banners.length-1].banners_image}}"></ion-img>
  <!-- All Products Header -->
  <ion-row class="top-icon-header">
    <ion-button fill="clear">
      <ion-icon slot="start" name="md-albums"></ion-icon>
      {{'Featured' | translate }}
    </ion-button>
    <ion-button id="second" fill="clear" (click)="openProducts('featured')">
      <ion-icon slot="end" name="arrow-dropright"></ion-icon>
      {{ 'Shop More' | translate }}
    </ion-button>
  </ion-row>
  <!-- scrolling products component -->
  <app-scrolling-featured-products></app-scrolling-featured-products>

  <!-- fab button to move at top of page  -->

</ion-content>
<ion-fab vertical="bottom" horizontal="end" *ngIf="scrollTopButton">
  <ion-fab-button (click)="scrollToTop()">
    <ion-icon name="arrow-round-up"></ion-icon>
  </ion-fab-button>
</ion-fab>