import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {SuitCompaniesCompComponent} from "./suit-companies-comp/suit-companies-comp.component";
import {AuthGuard} from "../user/guard-auth/auth.guard";
import {NavMenuComponent} from "./nav-menu/nav-menu.component";
import {PageMineComponent} from "./page-mine/page-mine.component";
import {RecommendedTemplatesComponent} from "./recommended-templates/recommended-templates.component";
import {AllcompanyComponent} from "./allcompany/allcompany.component";
import {CompanydetailComponent} from "./companydetail/companydetail.component";
import {MockInterviewsComponent} from "./mock-interviews/mock-interviews.component";
import {ExperienceSquareComponent} from "./experience-square/experience-square.component";
import {
  ExperienceSquareInformationComponent
} from "./experience-square-information/experience-square-information.component";
import {ExperienceSquareUserComponent} from "./experience-square-user/experience-square-user.component";

const routes: Routes = [
  {
    path: "",
    component: NavMenuComponent,
    children: [
      {
        path: 'suit-company', component: SuitCompaniesCompComponent, canActivate: [AuthGuard]
      },
      {
        path: 'mine', component: PageMineComponent,
        canActivate: [AuthGuard],
      },
      {
        path: 'recomtem', component: RecommendedTemplatesComponent, canActivate: [AuthGuard]
      },
      {
        path: 'allcompany', component: AllcompanyComponent, canActivate: [AuthGuard]
      },
      {
        path: 'allcompany/companydetail', component: CompanydetailComponent, canActivate: [AuthGuard]
      },
      {
        path: 'minterviews', component: MockInterviewsComponent,
        canActivate: [AuthGuard],
      },
      {
        path: 'expersquare', component: ExperienceSquareComponent,
        canActivate: [AuthGuard],
      },
      {
        path: 'expersquare/info', component: ExperienceSquareInformationComponent,
      },
      {
        path: 'expersquare/user', component: ExperienceSquareUserComponent,
        canActivate: [AuthGuard],
      }
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class HomeRoutingModule {
}
