import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { MatDateFnsModule } from '@angular/material-date-fns-adapter';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatChipsModule } from '@angular/material/chips';
import { MAT_DATE_LOCALE } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatIconModule } from '@angular/material/icon';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatSortModule } from '@angular/material/sort';
import { MatTableModule } from '@angular/material/table';
import { MatTabsModule } from '@angular/material/tabs';
import { RouterModule } from '@angular/router';
import { de } from 'date-fns/locale';
import { UtilNgxEchartsModule } from '../../core/components/ngx-echarts/util-ngx-echarts.module';
import { ManagerInfoCardComponent } from './components/manager-info-card/manager-info-card.component';
import { MetricSummaryComponent } from './components/metric-summary/metric-summary.component';
import { ViewTypeSelectorComponent } from './components/view-type-selector/view-type-selector.component';
import { DayviewComponent } from './dayview/dayview.component';
import { ManagerDashboardComponent } from './manager-dashboard/manager-dashboard.component';
import { MonthviewComponent } from './monthview/monthview.component';
import { OverviewComponent } from './overview/overview.component';
import { TimePerTourByCarComponent } from './time-per-tour-by-car/time-per-tour-by-car.component';
import { TimePerTourKPIComponent } from './time-per-tour-kpi/time-per-tour-kpi.component';

@NgModule({
  imports: [
    CommonModule,
    RouterModule.forChild([
      {
        path: '',
        component: ManagerDashboardComponent,
        children: [
          {
            path: 'overview',
            component: OverviewComponent,
          },
          {
            path: 'dayview',
            component: DayviewComponent,
          },
          {
            path: 'monthview',
            component: MonthviewComponent,
          },
          {
            path: '',
            pathMatch: 'full',
            redirectTo: 'overview',
          },
        ],
      },
    ]),
    MatCardModule,
    MatIconModule,
    MatTableModule,
    MatPaginatorModule,
    MatSortModule,
    MatDateFnsModule,
    MatDatepickerModule,
    MatButtonModule,
    MatIconModule,
    MatTabsModule,
    MatChipsModule,
    MatProgressBarModule,
    ReactiveFormsModule,
    UtilNgxEchartsModule,
    MetricSummaryComponent,
    ViewTypeSelectorComponent,
    ManagerInfoCardComponent,
  ],
  declarations: [
    ManagerDashboardComponent,
    TimePerTourKPIComponent,
    TimePerTourByCarComponent,
    OverviewComponent,
    DayviewComponent,
    MonthviewComponent,
  ],
  providers: [
    {
      provide: MAT_DATE_LOCALE,
      useValue: de,
    },
  ],
})
export class AvicennaWebFeatureDashboardManagerModule {}
