import { LoginComponent } from './components/login/login.component';
import { RegisterComponent } from './components/register/register.component';
import { HomeComponent } from './components/home/home.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 {AuthGuard} from './core/auth.guard';

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';


export const AppRoutes = [
  {path: '', component: HomeComponent},
  {path: 'login', component: LoginComponent},
  {path: 'register', component: RegisterComponent},
  {path: 'profil', component: ProfilComponent, canActivate: [AuthGuard]},
  {path: 'opCommercial', component: OpCommercialComponent, canActivate: [AuthGuard]},
  {path: 'creationOpCommercial', component: CreationOpComComponent, canActivate: [AuthGuard]},
  {path: 'carteParrainageComponent', component: CarteParrainageComponent, canActivate: [AuthGuard]},
  {path: 'EnvoyerCarte/:idOp', component: EnvoyerCarteComponent, canActivate: [AuthGuard]},
  {path: 'scannerCarte/:idOp', component: ScannerCarteComponent, canActivate: [AuthGuard]},
  {path: 'debiterCarte/:idOp', component: DebiterCarteComponent, canActivate: [AuthGuard]},
  {path: 'editProfil', component: EditProfilComponent, canActivate: [AuthGuard]},
  {path: 'historiqueCarte', component: CarteEnvoyerComponent, canActivate: [AuthGuard]},
  {path: 'listOpCommercialAdmin', component: ListeOpCommercialComponent, canActivate: [AuthGuard]},
  {path: 'demandeOpCommercialAdmin', component: DemandeOpCommercialComponent, canActivate: [AuthGuard]},
  {path: 'ListCarteEnvoyerAdmin/:idOp', component: ListCarteEnvoyerComponent, canActivate: [AuthGuard]},
  {path: 'ListScanEffecterAdmin/:idOp', component: ListScanEffecterComponent, canActivate: [AuthGuard]},
  {path: 'ResetPassword', component: ResetPasswordComponent},
  {path: 'Cgu', component: CguComponent}
];
