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

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

import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { ListItemComponent } from './components/list-item.component';
import {
  MatBadgeModule,
  MatCheckboxModule,
  MatRippleModule
} from '@angular/material';

import { UCapUiModule } from '@ucap-webmessenger/ui';
import { TranslateModule } from '@ngx-translate/core';

const COMPONENTS = [ListItemComponent];
const DIRECTIVES = [];
const SERVICES = [];

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    FlexLayoutModule,
    MatFormFieldModule,
    MatIconModule,
    MatInputModule,
    MatRippleModule,
    MatBadgeModule,
    MatCheckboxModule,

    TranslateModule,

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