import { Component } from '@angular/core';
import { Platform } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import {environment} from "../environments/environment";
import {AppVersion} from "@ionic-native/app-version";

@Component({
  selector: 'app-root',
  templateUrl: 'app.component.html'
})
export class AppComponent {
  constructor(
    private platform: Platform,
    private splashScreen: SplashScreen,
    private statusBar: StatusBar,
    private appVersion:AppVersion,
  ) {
    this.initializeApp();
    // console.log(App)
  }

  initializeApp() {
    this.platform.ready().then(() => {
        this.splashScreen.hide();
        this.statusBar.show();
        this.statusBar.overlaysWebView(false);
        this.statusBar.backgroundColorByHexString('#e12724');
        this.statusBar.styleLightContent();
        this.appVersion.getVersionNumber().then((version:string)=>{
            alert(version);
        })

    });
  }
}
