import { ClickOnEnterDirective } from './../shared/click-on-enter.directive';
import { AttacksMaterialModule } from './attacks-material.module';
import { AttacksRoutesModule } from './attacks-routes.module';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AttacksListComponent } from './attacks-list/attacks-list.component';
import { AttackDetailComponent } from './attack-detail/attack-detail.component';
import { AttackEditComponent } from './attack-edit/attack-edit.component';
import { StoreModule } from '@ngrx/store';
import { EffectsModule } from '@ngrx/effects';
import { attacksReducers } from './store/attacks.redurecs';
import { AttacksEffects } from './store/attacks.effects';
import { ReactiveFormsModule } from '@angular/forms';
import { MomentModule } from 'angular2-moment';
import { AttackerEditComponent } from './attacker-edit/attacker-edit.component';
import { RelatedAttackEditComponent } from './related-attack-edit/related-attack-edit.component';
import { MAT_MOMENT_DATE_ADAPTER_OPTIONS } from '@angular/material-moment-adapter';
import { SharedModule } from '../shared/shared.module';
import { SoftTargetTypeEditComponent } from './soft-target-type-edit/soft-target-type-edit.component';

@NgModule({
  declarations: [
    AttacksListComponent, 
    AttackDetailComponent, 
    AttackEditComponent, 
    AttackerEditComponent, 
    RelatedAttackEditComponent, 
    SoftTargetTypeEditComponent
  ],
  entryComponents: [
    AttackerEditComponent,
    RelatedAttackEditComponent,
    SoftTargetTypeEditComponent
  ],
  providers: [
    { provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: { useUtc: true } }
  ],
  imports: [
    CommonModule,
    SharedModule,
    ReactiveFormsModule,
    AttacksRoutesModule,
    AttacksMaterialModule,
    MomentModule,
    StoreModule.forFeature('attacks', attacksReducers),
    EffectsModule.forRoot([AttacksEffects]),
  ]
})
export class AttacksModule { }
