import { AppRoutesModule } from './app-routes.module';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { AuthModule } from './auth/auth.module';
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { AuthEffects } from './auth/store/auth.effects';
import { CoreModule } from './core/core.module';
import { MatSidenavModule } from '@angular/material/sidenav'; 
import { clearState, reducers } from './store/app.reducers';
import { ScrollEventModule } from 'ngx-scroll-event';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutesModule,
    CoreModule,
    AuthModule,
    ScrollEventModule,
    StoreModule.forRoot(reducers, { metaReducers: [clearState] }),
    EffectsModule.forRoot([AuthEffects]),
    MatSidenavModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
