import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { ResponsiveCardListPage } from '../responsive-card-list/responsive-card-list';
import { ResponsiveAppleProductsPage } from '../responsive-apple-products/responsive-apple-products';

@Component({
  selector: 'page-page2',
  templateUrl: 'page2.html',
})
export class Page2 {
  public selectedItem: any;
  public icons: string[];
  public items: Array<{ title: string, note: string, icon: string }>;

  constructor(public navCtrl: NavController, public navParams: NavParams) {
    // If we navigated to this page, we will have an item available as a nav param
    this.selectedItem = navParams.get('item');

    // Let's populate this page with some filler content for funzies
    this.icons = ['flask', 'wifi', 'beer', 'football', 'basketball', 'paper-plane', 'american-football', 'boat', 'bluetooth', 'build'];

    this.items = [];
    for (let i = 1; i < 11; i++) {
      this.items.push({
    }
  }

  // public itemTapped(event, item) {
  //   // That's right, we're pushing to ourselves!
  //   this.navCtrl.push(Page2, { item: item });
  // }

  public redirectToCardList() {
    this.navCtrl.push(ResponsiveCardListPage);
  }

  public responsiveAppleProducts() {
    this.navCtrl.push(ResponsiveAppleProductsPage);
  }
}
        title: 'Item ' + i,
        note: 'This is item #' + i,
        icon: this.icons[Math.floor(Math.random() * this.icons.length)],
      });