import { Component, ViewChild } from '@angular/core';
import { Nav, Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

import { HomePage } from '../pages/home/home';
import { Userpage } from '../pages/userpage/userpage';
import { Projects } from '../pages/projects/projects';
import { Customers } from '../pages/customers/customers';
import { Statistics } from '../pages/statistics/statistics';
import { Sms } from '../pages/sms/sms';

//import { LoginPage } from '../pages/login/login';


@Component({
  templateUrl: 'app.html'
})
export class 
 {
  @ViewChild(Nav) nav: Nav;

  rootPage: any = HomePage;

  pages: Array<{title: string, component: any}>;

  constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen) {
    this.initializeApp();

    // used for an example of ngFor and navigation
    this.pages = [
      { title: 'Dashboard', component: Userpage },
      { title: 'Müşteriler', component: Customers},
      { title: 'Projeler', component: Projects },
      { title: 'İstatistikler', component: Statistics },
      { title: 'SMS', component: Sms },
    ];

  }

  initializeApp() {
    this.platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      this.statusBar.styleDefault();
      this.splashScreen.hide();
    });
  }

  openPage(page) {
    // Reset the content nav to have just this page
    // we wouldn't want the back button to show in this scenario
    this.nav.setRoot(page.component);
  }
}

MyApp