import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'

import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { MatAutocompleteModule } from '@angular/material/autocomplete'
import { MatButtonModule } from '@angular/material/button'
import { MatCardModule } from '@angular/material/card'
import { MatExpansionModule } from '@angular/material/expansion'
import { MatFormFieldModule } from '@angular/material/form-field'
import { MatIconModule } from '@angular/material/icon'
import { MatInputModule } from '@angular/material/input'
import { MatListModule } from '@angular/material/list'
import { MatMenuModule } from '@angular/material/menu'
import { MatSidenavModule } from '@angular/material/sidenav'
import { MatTableModule } from '@angular/material/table'
import { MatToolbarModule } from '@angular/material/toolbar'
import { MatTooltipModule } from '@angular/material/tooltip'

// Use Plotly Via Window Module
// See https://github.com/plotly/angular-plotly.js/blob/master/README.md#plotly-via-window-module
import { PlotlyViaWindowModule } from 'angular-plotly.js'

//import * as PlotlyJS from 'plotly.js-dist-min'
//import { PlotlyModule } from 'angular-plotly.js'
//PlotlyModule.plotlyjs = PlotlyJS

import { PipesModule } from '../pipes.module'

// import { DashboardDataService } from '../_services/apollo.service'
import { DashboardComponent } from './dashboard.component'
import { DashboardRoutingModule } from './dashboard-routing.module'
import { DashboardMenuComponent } from './dashboard-menu/dashboard-menu.component'
import { DashboardPageComponent } from './dashboard-page/dashboard-page.component'
import { DashboardPageSectionsComponent } from './dashboard-page/dashboard-page-sections.component'
import { DashboardHomeComponent } from './dashboard-home/dashboard-home.component'

@NgModule({
    imports: [
        CommonModule,

        FormsModule,
        ReactiveFormsModule,
        MatAutocompleteModule,
        MatButtonModule,
        MatCardModule,
        MatExpansionModule,
        MatFormFieldModule,
        MatIconModule,
        MatInputModule,
        MatListModule,
        MatMenuModule,
        MatSidenavModule,
        MatTableModule,
        MatToolbarModule,
        MatTooltipModule,

        //PlotlyModule,
        PlotlyViaWindowModule,

        PipesModule,

        DashboardRoutingModule,
    ],
    declarations: [
        DashboardComponent,
        DashboardMenuComponent,
        DashboardPageComponent,
        DashboardPageSectionsComponent,
        DashboardHomeComponent,
    ],
    providers: [
        // DashboardDataService
    ]
})

export class DashboardModule {}
