import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';

import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { IonicStorageModule } from '@ionic/storage';
import { HttpClientModule } from '@angular/common/http';

// Modal page
import { InAppBrowserPageModule } from './in-app-browser/in-app-browser.module';

// Services import
import { AuthService } from './services/auth.service';
import { MallService } from './services/mall.service';
import { OrderService } from './services/order.service';
import { ToastService } from './services/toast.service';
import { AdvertisementService } from './services/advertisement.service';

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';

// Native Plugins
import { Geolocation } from '@ionic-native/geolocation/ngx';

@NgModule({
    declarations: [AppComponent],
    entryComponents: [],
    imports: [
        BrowserModule,
        IonicModule.forRoot(),
        AppRoutingModule,
        IonicStorageModule.forRoot(),
		HttpClientModule,
        InAppBrowserPageModule,
        ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })],
    providers: [
        StatusBar,
        SplashScreen,
        AuthService,
        MallService,
		Geolocation,
		ToastService,
        OrderService,
        AdvertisementService,
        { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }
