import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { RouterModule, Routes} from '@angular/router';
import { AppRoutes } from './app.routes';

import { MDBBootstrapModule } from './typescripts/angular-bootstrap-md/free';
import { MDBBootstrapModulePro } from './typescripts/angular-bootstrap-md/pro';
import { AgmCoreModule } from '@agm/core';

import { AppComponent } from './app.component';
import { AngularFireModule } from 'angularfire2';
import { AngularFireDatabaseModule } from 'angularfire2/database';
import { AngularFireAuthModule } from 'angularfire2/auth';
import { environment } from '../environments/environment';
import { HomeComponent } from './components/home/home.component';
import { LoginComponent } from './components/login/login.component';
import { RegisterComponent } from './components/register/register.component';
import { NavigationBarComponent } from './components/navigationBar/navigationBar.component';
import { ProfilComponent } from './components/profil/profil.component';
import { OpCommercialComponent } from './components/opCommercial/op-commercial/op-commercial.component';
import { CreationOpComComponent } from './components/opCommercial/creation-op-com/creation-op-com.component';
import { CarteParrainageComponent } from './components/carteParrainage/carte-parrainage/carte-parrainage.component';
import { EnvoyerCarteComponent } from './components/opCommercial/envoyer-carte/envoyer-carte.component';
import { ScannerCarteComponent } from './components/opCommercial/scanner-carte/scanner-carte.component';
import { EditProfilComponent } from './components/profil/edit-profil/edit-profil.component';
import { DebiterCarteComponent } from './components/opCommercial/debiter-carte/debiter-carte.component';
import { CarteEnvoyerComponent } from './components/carteParrainage/carte-envoyer/carte-envoyer.component';
import { NavCommercantComponent } from './components/navigationBar/nav-commercant/nav-commercant.component';
import { NavParrainComponent } from './components/navigationBar/nav-parrain/nav-parrain.component';

import { AuthGuard } from './core/auth.guard';
import { AuthService } from './services/auth/auth.service';
import { NavAdminComponent } from './components/navigationBar/nav-admin/nav-admin.component';
import { ListeOpCommercialComponent } from './components/admin/liste-op-commercial/liste-op-commercial.component';
import { DemandeOpCommercialComponent } from './components/admin/demande-op-commercial/demande-op-commercial.component';
import { ListCarteEnvoyerComponent } from './components/admin/list-carte-envoyer/list-carte-envoyer.component';
import { ListScanEffecterComponent } from './components/admin/list-scan-effecter/list-scan-effecter.component';
import { ResetPasswordComponent } from './components/home/reset-password/reset-password.component';
import { CguComponent } from './components/home/cgu/cgu.component';



@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    NavigationBarComponent,
    LoginComponent,
    RegisterComponent,
    ProfilComponent,
    OpCommercialComponent,
    CreationOpComComponent,
    CarteParrainageComponent,
    EnvoyerCarteComponent,
    EditProfilComponent,
    ScannerCarteComponent,
    DebiterCarteComponent,
    CarteEnvoyerComponent,
    NavCommercantComponent,
    NavParrainComponent,
    NavAdminComponent,
    ListeOpCommercialComponent,
    DemandeOpCommercialComponent,
    ListCarteEnvoyerComponent,
    ListScanEffecterComponent,
    ResetPasswordComponent,
    CguComponent
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    HttpModule,
    MDBBootstrapModule.forRoot(),
    MDBBootstrapModulePro.forRoot(),
    AngularFireModule.initializeApp(environment.firebase),
    AngularFireDatabaseModule,
    AngularFireAuthModule,
    RouterModule.forRoot(AppRoutes)
    // https://developers.google.com/maps/documentation/javascript/get-api-key?hl=en#key
    // AgmCoreModule.forRoot({
    //   apiKey: 'google_maps_api_key'
    // })
  ],
  providers: [AuthGuard, AuthService],
  bootstrap: [AppComponent],
  schemas: [NO_ERRORS_SCHEMA]
})
export class AppModule { }
