import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ReactiveFormsModule } from '@angular/forms';

import { FlexLayoutModule } from '@angular/flex-layout';

import { ScrollingModule } from '@angular/cdk/scrolling';

import { MatRippleModule, MatCheckboxModule } from '@angular/material';
import { MatButtonModule } from '@angular/material/button';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatIconModule } from '@angular/material/icon';
import { MatTreeModule } from '@angular/material/tree';

import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';

import { ExpansionPanelComponent } from './components/expansion-panel.component';
import { ExpansionPanelItemDirective } from './directives/expansion-panel-item.directive';

const COMPONENTS = [ExpansionPanelComponent];
const DIALOGS = [];
const DIRECTIVES = [ExpansionPanelItemDirective];
const SERVICES = [];

@NgModule({
  imports: [
    CommonModule,
    ReactiveFormsModule,
    FlexLayoutModule,

    ScrollingModule,

    MatButtonModule,
    MatExpansionModule,
    MatIconModule,
    MatTreeModule,
    MatCheckboxModule,
    MatRippleModule,

    PerfectScrollbarModule
  ],
  exports: [...COMPONENTS, ...DIRECTIVES],
  declarations: [...COMPONENTS, ...DIRECTIVES],
  entryComponents: []
})
export class UCapUiGroupModule {
  public static forRoot(): ModuleWithProviders<UCapUiGroupModule> {
    return {
      ngModule: UCapUiGroupModule,
      providers: [...SERVICES]
    };
  }
}
