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

import { MyApp } from './app.component';
import { LoginPage } from '../pages/login/login';
import { StreamPage, NewPostModal, PostMenu } from '../pages/stream/stream';
import { ThreadPage } from '../pages/thread/thread';
import { SettingsPage } from '../pages/settings/settings';

import { SplashScreen } from '@ionic-native/splash-screen';
import { IonicStorageModule } from '@ionic/storage';
import { Device } from '@ionic-native/device';
import { FileChooser } from '@ionic-native/file-chooser';
import { FilePath } from '@ionic-native/file-path';
import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer';
import { TimeagoPipe } from '../pipes/timeago/timeago';
import { ParserPipe } from '../pipes/parser/parser';

@NgModule({
  declarations: [
    MyApp,
    LoginPage,
    StreamPage,
    ThreadPage,
    SettingsPage,
    TimeagoPipe,
    NewPostModal,
    PostMenu,
    ParserPipe
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
    IonicStorageModule.forRoot(),
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    LoginPage,
    StreamPage,
    ThreadPage,
    SettingsPage,
    NewPostModal,
    PostMenu
  ],
  providers: [
    SplashScreen,
    Device,
    FileChooser,
    FilePath,
    FileTransfer,
    FileTransferObject,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}
