import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';
import { DetailPage } from '../pages/detail/detail';
import { LoginPage } from '../pages/login/login';
import { EventPage } from '../pages/event/event';
import { ProductCatDetailPage } from '../pages/product-cat-detail/product-cat-detail';
import { NewsReaderPage } from '../pages/news-reader/news-reader';
import { CouponViewPage } from '../pages/coupon-view/coupon-view';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { HealthProvider } from '../providers/health/health';
import { HttpClientModule }    from '@angular/common/http';
import { InAppBrowser } from '@ionic-native/in-app-browser';
import { NativeStorage } from '@ionic-native/native-storage';
//import { Health } from '@ionic-native/health';
import { MomentModule } from 'ngx-moment';
import { SocialSharing } from '@ionic-native/social-sharing';
import { Device } from '@ionic-native/device';
import { NgxChartsModule } from '@swimlane/ngx-charts';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ComponentsModule} from '../components/components.module';

import { HumanizePipe  } from 'angular2-humanize';
import { UserAgent } from '@ionic-native/user-agent';

import { HTTP  } from '@ionic-native/http';

@NgModule({
    declarations: [
        MyApp,
        AboutPage,
        ContactPage,
        HomePage,
        TabsPage,
        DetailPage,
        LoginPage,
        EventPage,
        ProductCatDetailPage,
        NewsReaderPage,
        CouponViewPage
    ],
    imports: [
        BrowserModule,
        HttpClientModule,
        MomentModule,
        //SocialSharing,
        NgxChartsModule,
        BrowserAnimationsModule,
        ComponentsModule,
        IonicModule.forRoot(MyApp)
    ],
    bootstrap: [IonicApp],
    entryComponents: [
        MyApp,
        AboutPage,
        ContactPage,
        HomePage,
        TabsPage,
        DetailPage,
        LoginPage,
        EventPage,
        ProductCatDetailPage,
        NewsReaderPage,
        CouponViewPage
    ],
    providers: [
        StatusBar,
        SplashScreen,
        InAppBrowser,
        NativeStorage,
        {provide: ErrorHandler, useClass: IonicErrorHandler},
        HealthProvider,
        /*Health,*/
        SocialSharing,
        HumanizePipe,
        Device,
        HTTP, 
        UserAgent
    ]
})
export class AppModule {}
