/*
 * Copyright (C) 2018 Robert Bosch GmbH Copyright (C) 2018 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { PortalModule } from '@angular/cdk/portal';
import { ScrollingModule } from '@angular/cdk/scrolling';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatChipsModule } from '@angular/material/chips';
import { MatDialogModule } from '@angular/material/dialog';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule, MatIconRegistry } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatListModule } from '@angular/material/list';
import { MatMenuModule } from '@angular/material/menu';
import { MatSelectModule } from '@angular/material/select';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatTabsModule } from '@angular/material/tabs';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatTooltipModule } from '@angular/material/tooltip';
import { BCI_ALERT_DIALOG_INTL_PROVIDER, BciComponentModule, BciSharedModule } from '@bci-web-core/core';
import { GridsterModule } from 'angular-gridster2';
import { PinboardFilterBarComponent } from './pinboard-filter-bar/pinboard-filter-bar.component';
import { PinboardGridComponent } from './pinboard-grid/pinboard-grid.component';
import { PinboardComponent } from './pinboard/pinboard.component';
import { ArrayToStringPipe } from './pipes/array-to-string.pipe';
import { WidgetCatalogComponent } from './widget-catalog/widget-catalog.component';
import { WidgetSettingsFormComponent } from './widget-settings/widget-settings-form/widget-settings-form.component';
import { WidgetSettingsComponent } from './widget-settings/widget-settings.component';
import { WidgetComponent } from './widget/widget.component';

@NgModule({
  declarations: [
    WidgetComponent,
    WidgetSettingsComponent,
    WidgetCatalogComponent,
    PinboardComponent,
    PinboardGridComponent,
    WidgetSettingsFormComponent,
    PinboardFilterBarComponent,
    ArrayToStringPipe,
  ],
  imports: [
    BciSharedModule,
    BciComponentModule,
    GridsterModule,
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    PortalModule,
    /*Material Imports*/
    MatCheckboxModule,
    MatIconModule,
    MatFormFieldModule,
    MatInputModule,
    MatButtonModule,
    MatCardModule,
    MatListModule,
    MatExpansionModule,
    MatToolbarModule,
    MatChipsModule,
    MatTooltipModule,
    MatMenuModule,
    MatSelectModule,
    MatSidenavModule,
    MatSlideToggleModule,
    MatDialogModule,
    MatTabsModule,
    ScrollingModule,
  ],
  exports: [
    PinboardComponent,
    PinboardFilterBarComponent,
    WidgetComponent,
    WidgetSettingsComponent,
    WidgetCatalogComponent,
    PinboardGridComponent,
    WidgetSettingsFormComponent,
  ],
  providers: [BCI_ALERT_DIALOG_INTL_PROVIDER],
  bootstrap: [PinboardComponent],
})
export class PinboardModule {
  public constructor(public matIconRegistry: MatIconRegistry) {
    matIconRegistry.setDefaultFontSetClass('bosch-ic');
  }
}
