import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {RouteReuseStrategy} from '@angular/router';
import {HttpClientModule} from '@angular/common/http';

import {IonicModule, IonicRouteStrategy} from '@ionic/angular';
import {SplashScreen} from '@ionic-native/splash-screen/ngx';
import {StatusBar} from '@ionic-native/status-bar/ngx';
import {LocalNotifications} from '@ionic-native/local-notifications/ngx';
import {FormsModule} from '@angular/forms';
import {HTTP_INTERCEPTORS} from '@angular/common/http';
import {NgZorroAntdMobileModule, TabsModule} from 'ng-zorro-antd-mobile';

import {AppComponent} from './app.component';
import {AppRoutingModule} from './app-routing.module';
import {SubTitleComponent} from './components/sub-title/sub-title.component';
import {SwitchComponent} from './components/switch/switch.component';
import {AlarmBarComponent} from './components/alarm-bar/alarm-bar.component';
import {SearchHistoryComponent} from './components/search-history/search-history.component';
import {RefreshComponent} from './components/refresh/refresh.component';

import {AppMinimize} from '@ionic-native/app-minimize/ngx';

import {HomePage} from './home/home.page';
import {EastPage} from './east/east.page';
import {LoginPage} from './login/login.page';
import {AlarmPage} from './alarm/alarm.page';
import {RowPage} from './row/row.page';
import {IndexPage} from './index/index.page';
import {OtherPage} from './other/other.page';
import {SearchPage} from './search/search.page';
import {MinePage} from './mine/mine.page';

import {Api} from './service/api';
import {Auth} from './service/auth';
import {Http} from './service/http';
import {Transfer} from './service/transfer';
import {AuthInterceptor} from './service/token';
import {Mqtt} from './service/mqtt';
import {Load} from './service/load';
import {LoadingBumpComponent} from './components/loading-bump/loading-bump.component';
import {KanbanComponent} from './components/kanban/kanban.component';
import {WtModule} from './components/wt/wt.module';
import {EnvHomePage} from './envCtrl/env-home/env-home.page';
import {EnvAnalPage} from './envCtrl/env-anal/env-anal.page';
import {EnvDetailPage} from './envCtrl/env-detail/env-detail.page';
import {EnvCfgPage} from './envCtrl/env-cfg/env-cfg.page';
import {EnvShowerPage} from './envCtrl/env-shower/env-shower.page';
import {EnvWaterchannelPage} from './envCtrl/env-waterchannel/env-waterchannel.page';
import {EnvAlarmPage} from './envCtrl/env-alarm/env-alarm.page';
import {EnvFanPage} from './envCtrl/env-fan/env-fan.page';
import {TabsPage} from './envCtrl/tabs/tabs.page';
import {EnvLightPage} from './envCtrl/env-light/env-light.page';
import {NgxEchartsModule} from 'ngx-echarts';
import {NgxDatatableModule} from '@swimlane/ngx-datatable';
import {EnvAlarmDetailPage} from './envCtrl/env-alarm-detail/env-alarm-detail.page';

@NgModule({
    declarations: [
        AppComponent,
        SubTitleComponent,
        AlarmBarComponent,
        SearchHistoryComponent,
        RefreshComponent,
        LoadingBumpComponent,
        HomePage,
        EastPage,
        LoginPage,
        AlarmPage,
        RowPage,
        IndexPage,
        OtherPage,
        SearchPage,
        MinePage,
        EnvDetailPage,
        EnvFanPage,
        EnvShowerPage,
        EnvLightPage,
        EnvWaterchannelPage,
        // EnvAnalPage,
        // EnvAlarmPage,
        // EnvAlarmDetailPage,
    ],
    entryComponents: [],
    imports: [
        BrowserModule,
        IonicModule.forRoot(),
        AppRoutingModule,
        FormsModule,
        HttpClientModule,
        BrowserAnimationsModule,
        NgZorroAntdMobileModule,
        TabsModule,
        WtModule,
        NgxEchartsModule,
        NgxDatatableModule,
    ],
    providers: [
        StatusBar,
        SplashScreen,
        {provide: RouteReuseStrategy, useClass: IonicRouteStrategy},
        {
            provide: HTTP_INTERCEPTORS,
            useClass: AuthInterceptor,
            multi: true,
        },
        AppMinimize,
        LocalNotifications,
        Api,
        Auth,
        Http,
        Mqtt,
        Transfer,
        Load
    ],
    bootstrap: [AppComponent]
})
export class AppModule {
}
