import * as tslib_1 from "tslib";
import { Component } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { AuthService } from './../../config/auth.service';
import { MenuController, Platform } from '@ionic/angular';
let LoginPage = class LoginPage {
    constructor(router, route, authService, menuCtrl, platform) {
        this.router = router;
        this.route = route;
        this.authService = authService;
        this.menuCtrl = menuCtrl;
        this.platform = platform;
    }
    ngOnInit() { }
    ionViewWillEnter() {
        this.menuCtrl.enable(false);
    }
    ionViewDidEnter() {
        this.subscription = this.platform.backButton.subscribe(() => {
            console.log('cancelled');
            // tslint:disable-next-line:no-string-literal
            navigator['app'].exitApp();
        });
    }
    ionViewWillLeave() {
        this.subscription.unsubscribe();
    }
    goToPage(path, data = null) {
        this.router.navigateByUrl(path, { replaceUrl: true, queryParams: data });
        document.body.scrollTop = document.documentElement.scrollTop = 0;
    }
};
LoginPage = tslib_1.__decorate([
    Component({
        selector: 'app-login',
        templateUrl: './login.page.html',
        styleUrls: ['./login.page.scss']
    }),
    tslib_1.__metadata("design:paramtypes", [Router,
        ActivatedRoute,
        AuthService,
        MenuController,
        Platform])
], LoginPage);
export { LoginPage };
//# sourceMappingURL=login.page.js.map