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 } from '@angular/material';

import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
import { MatTreeModule } from '@angular/material/tree';

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

import { TenantSearchComponent } from './components/tenant-search.component';
import { TreeComponent } from './components/tree.component';

const COMPONENTS = [TenantSearchComponent, TreeComponent];
const SERVICES = [];

@NgModule({
  imports: [
    CommonModule,
    ReactiveFormsModule,

    FlexLayoutModule,
    ScrollingModule,

    MatRippleModule,
    MatButtonModule,
    MatIconModule,
    MatInputModule,
    MatSelectModule,
    MatTreeModule,

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