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

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

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

import { MatRippleModule } from '@angular/material/core';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatBadgeModule } from '@angular/material/badge';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatIconModule } from '@angular/material/icon';
import { MatMenuModule } from '@angular/material/menu';
import { MatSelectModule } from '@angular/material/select';
import { MatTreeModule } from '@angular/material/tree';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatStepperModule } from '@angular/material/stepper';

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

import { I18nModule, UCAP_I18N_NAMESPACE } from '@ucap/ng-i18n';
import { UiModule } from '@ucap/ng-ui';
import { ChatUiModule } from '@ucap/ng-ui-chat';
import { AppChatModule } from '@app/ucap/chat/chat.module';
import { AppLayoutsModule } from '@app/layouts/layouts.module';
import { AppGroupSectionModule } from '../group/group.section.module';

import { COMPONENTS } from './components';
import { DIALOGS } from './dialogs';

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

    MatInputModule,
    MatFormFieldModule,
    MatIconModule,
    MatCardModule,
    MatCheckboxModule,
    MatAutocompleteModule,
    MatSelectModule,
    MatBadgeModule,
    MatMenuModule,
    MatToolbarModule,
    MatButtonModule,
    MatRippleModule,
    MatTreeModule,
    MatTooltipModule,
    MatStepperModule,

    PerfectScrollbarModule,
    ScrollingModule,

    I18nModule,
    UiModule,

    AppLayoutsModule,
    AppGroupSectionModule,
    ChatUiModule,
    AppChatModule
  ],
  exports: [...COMPONENTS, ...DIALOGS],
  declarations: [...COMPONENTS, ...DIALOGS],
  entryComponents: [...DIALOGS],
  providers: [
    {
      provide: UCAP_I18N_NAMESPACE,
      useValue: ['chat', 'common']
    }
  ]
})
export class AppChatSectionModule {}
