import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';

import { IonicModule } from '@ionic/angular';

import { TabsPage } from './tabs.page';
import {EnvHomePage} from '../env-home/env-home.page';
import {EnvAnalPage} from '../env-anal/env-anal.page';
import {EnvDetailPage} from '../env-detail/env-detail.page';
import {EnvAlarmPage} from '../env-alarm/env-alarm.page';
import {EnvCfgPage} from '../env-cfg/env-cfg.page';
import {KanbanComponent} from '../../components/kanban/kanban.component';
import {AppModule} from '../../app.module';
import {WtModule} from '../../components/wt/wt.module';
import {EnvFanPage} from '../env-fan/env-fan.page';
import {EnvShowerPage} from '../env-shower/env-shower.page';
import {EnvLightPage} from '../env-light/env-light.page';
import {EnvWaterchannelPage} from '../env-waterchannel/env-waterchannel.page';
import {NgxEchartsModule} from 'ngx-echarts';
import {NgxDatatableModule} from '@swimlane/ngx-datatable';

const routes: Routes = [
  {
    path: '',
    component: TabsPage,
      children: [
          {
              path: 'tab-home',
              component: EnvHomePage,
          },
          {
              path: 'tab-anal',
              component: EnvAnalPage,
          },
          {
              path: 'tab-alarm',
              component: EnvAlarmPage,
          },
          {
              path: 'tab-cfg',
              component: EnvCfgPage,
          },
          {
              path: '',
              redirectTo: 'tab-home',
          },
      ],
  },
];

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    NgxEchartsModule,
    NgxDatatableModule,
    WtModule,
    RouterModule.forChild(routes),
  ],
  declarations: [TabsPage,
      EnvHomePage,
      EnvAnalPage,
      EnvAlarmPage,
      EnvCfgPage,
      // EnvDetailPage,
      // EnvFanPage,
      // EnvShowerPage,
      // EnvLightPage,
      // EnvWaterchannelPage,
      ]
})
export class TabsPageModule {}
