import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LoginComponent } from './component/login/login.component';
import { RegisterComponent } from './component/register/register.component';
import { UserComponent } from './component/user/user.component';
import { AuthenticationGuard } from './guard/authentication.guard';
import { ManagementComponent } from './component/management/management.component';
import { UsersComponent } from './component/management/users/users.component';
import { SettingsComponent } from './component/management/settings/settings.component';
import { ProfileComponent } from './component/management/profile/profile.component';
import { UserEditComponent } from './component/management/users/user-edit/user-edit.component';
import { UserViewComponent } from './component/management/users/user-view/user-view.component';
import { UserResolver } from './component/management/users/user-resolver.service';
import { ProfessorComponent } from './component/professor/professor.component';
import { HomeComponent } from './component/home/home.component';
import { EventComponent } from './component/event/event.component';
import { BlogComponent } from './component/blog/blog.component';
import { EventFormComponent } from './component/event-form/event-form.component';

export const routes: Routes = [
  // {
  //   path: '',
  //   loadChildren: () =>
  //     import('./pages/pages.module').then((m) => m.PagesModule),
  // },

  {
    path: 'dashboard',
    loadChildren: () =>
      import('./admin/admin.module').then((m) => m.AdminModule),
  },

  { path: '', redirectTo: '/dashboard', pathMatch: 'full' },

  // { path: 'home', component: HomeComponent },
  // { path: 'login', component: LoginComponent },
  // { path: 'register', component: RegisterComponent },
  // {
  //   path: 'settings',
  //   component: SettingsComponent,
  //   canActivate: [AuthenticationGuard],
  // },
  // {
  //   path: 'profile',
  //   component: ProfileComponent,
  //   canActivate: [AuthenticationGuard],
  // },
  // {
  //   path: 'events',
  //   component: EventComponent,
  //   canActivate: [AuthenticationGuard],
  // },
  // {
  //   path: 'eventForm',
  //   component: EventFormComponent,
  //   canActivate: [AuthenticationGuard],
  // },
  // {
  //   path: 'eventForm/:id',
  //   component: EventFormComponent,
  //   canActivate: [AuthenticationGuard],
  // },
  // {
  //   path: 'blogs',
  //   component: BlogComponent,
  //   canActivate: [AuthenticationGuard],
  // },
  // {
  //   path: 'user/management',
  //   component: UserComponent,
  //   canActivate: [AuthenticationGuard],
  // },
  // {
  //   path: 'professor/management',
  //   component: ProfessorComponent,
  //   canActivate: [AuthenticationGuard],
  // },

  // {
  //   path: 'management', component: ManagementComponent, canActivate: [AuthenticationGuard],
  //   children: [
  //     {path: 'settings', component: SettingsComponent},
  //     {path: 'profile', component: ProfileComponent},
  //     {
  //       path: 'users', component: UsersComponent,
  //       children: [
  //         {path: ':id/view', component: UserViewComponent, resolve: {user: UserResolver}},
  //         {path: ':id/edit', component: UserEditComponent}
  //       ]
  //     }
  //   ]
  // },
  // { path: '', redirectTo: '/login', pathMatch: 'full' },
];

@NgModule({
  imports: [RouterModule.forRoot(routes,{ useHash: true)],
  exports: [RouterModule],
})
export class AppRoutingModule {}
