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';

// Services import
import { MallService } from './services/mall.service';
import { MenuItemService } from './services/menu-item.service';
import { OfferService } from './services/offer.service';
import { OutletService } from './services/outlet.service';
import { CartItemService } from './services/cart-item.service';
import { UserDataService } from './services/user-data.service';
import { OrderService } from './services/order.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,
        ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })],
    providers: [
        StatusBar,
        SplashScreen,
        MallService,
        MenuItemService,
        OfferService,
        OutletService,
        CartItemService,
        UserDataService,
		OrderService,
		Geolocation,
        { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }
