import { Component } from "@angular/core";
import {
  IonicPage,
  NavController,
  MenuController,
  ModalController
} from "ionic-angular";
import { AuthProvider } from "../../providers/auth/auth";
import { AboutPage } from "../about/about";
import { MockLoginPage } from "../mock-login/mock-login";
// import { HomePage } from "../home/home";
import { MockPage } from "../mock/mock";
import { Storage } from "@ionic/storage";


@IonicPage()
@Component({
  selector: "page-login",
  templateUrl: "login.html"
})
export class LoginPage {

  mockUp: boolean;

  constructor(
    public navCtrl: NavController,
    private menuCtrl: MenuController,
    private modalCtrl: ModalController,
    private storage: Storage
  ) {}

  ionViewDidLoad() {
    this.menuCtrl.enable(false, "sideNav");
  }

  login() {
  this.mockUp = true;
  this.storage.set("mockup", this.mockUp);
   this.navCtrl.setRoot(MockLoginPage);
  }

  showAbout() {
    this.modalCtrl.create(AboutPage).present();
  }
}
