import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { MainLayoutComponent } from './layout/main-layout/main-layout.component';
import { AuthLayoutComponent } from './layout/auth-layout/auth-layout.component';
import { LoginComponent } from './components/login/login.component';
import { DashboardComponent } from './components/dashboard/dashboard.component';
import { PageNotFoundComponent } from './shared/page-not-found/page-not-found.component';
import { AdminComponent } from './components/admin/admin.component';
import { UsersComponent } from './components/admin/users/users/users.component';
import { RolesComponent } from './components/admin/roles/roles/roles.component';
import { GroupsComponent } from './components/groups/groups.component';
import { PXEimagesComponent } from './components/ogboot/pxe-images/pxe-images.component';
import { PxeComponent } from './components/ogboot/pxe/pxe.component';
import { PxeBootFilesComponent } from './components/ogboot/pxe-boot-files/pxe-boot-files.component';
import {OgbootStatusComponent} from "./components/ogboot/ogboot-status/ogboot-status.component";
import { CalendarComponent } from "./components/calendar/calendar.component";
import { CommandsComponent } from './components/commands/main-commands/commands.component';
import { CommandsGroupsComponent } from './components/commands/commands-groups/commands-groups.component';
import { CommandsTaskComponent } from './components/commands/commands-task/commands-task.component';
import { TaskLogsComponent } from './components/commands/commands-task/task-logs/task-logs.component';
import { ClientMainViewComponent } from './components/groups/components/client-main-view/client-main-view.component';
import { ImagesComponent } from './components/images/images.component';
import {SoftwareComponent} from "./components/software/software.component";
import {SoftwareProfileComponent} from "./components/software-profile/software-profile.component";
import {OperativeSystemComponent} from "./components/operative-system/operative-system.component";
import {
  PartitionAssistantComponent
} from "./components/groups/components/client-main-view/partition-assistant/partition-assistant.component";
import {RepositoriesComponent} from "./components/repositories/repositories.component";
import {
  CreateClientImageComponent
} from "./components/groups/components/client-main-view/create-image/create-image.component";
import {
  DeployImageComponent
} from "./components/groups/components/client-main-view/deploy-image/deploy-image.component";
import {
  MainRepositoryViewComponent
} from "./components/repositories/main-repository-view/main-repository-view.component";
import {EnvVarsComponent} from "./components/admin/env-vars/env-vars.component";
import {MenusComponent} from "./components/menus/menus.component";
import {OgDhcpSubnetsComponent} from "./components/ogdhcp/og-dhcp-subnets.component";
import {StatusComponent} from "./components/ogdhcp/status/status.component";
import {
  RunScriptAssistantComponent
} from "./components/groups/components/client-main-view/run-script-assistant/run-script-assistant.component";
const routes: Routes = [
  { path: '', redirectTo: 'auth/login', pathMatch: 'full' },
  { path: '', component: MainLayoutComponent,
    children: [
      { path: 'dashboard', component: DashboardComponent },
      { path: 'admin', component: AdminComponent },
      { path: 'users', component: UsersComponent },
      { path: 'env-vars', component: EnvVarsComponent },
      { path: 'user-groups', component: RolesComponent },
      { path: 'groups', component: GroupsComponent },
      { path: 'pxe-images', component: PXEimagesComponent },
      { path: 'pxe', component: PxeComponent },
      { path: 'pxe-boot-file', component: PxeBootFilesComponent },
      { path: 'ogboot-status', component: OgbootStatusComponent },
      { path: 'subnets', component: OgDhcpSubnetsComponent },
      { path: 'ogdhcp-status', component: StatusComponent },
      { path: 'commands', component: CommandsComponent },
      { path: 'commands-groups', component: CommandsGroupsComponent },
      { path: 'commands-task', component: CommandsTaskComponent },
      { path: 'commands-logs', component: TaskLogsComponent },
      { path: 'calendars', component: CalendarComponent },
      { path: 'clients/deploy-image', component: DeployImageComponent },
      { path: 'clients/partition-assistant', component: PartitionAssistantComponent },
      { path: 'clients/run-script', component: RunScriptAssistantComponent },
      { path: 'clients/:id', component: ClientMainViewComponent },
      { path: 'clients/:id/create-image', component: CreateClientImageComponent },
      { path: 'repositories', component: RepositoriesComponent },
      { path: 'repository/:id', component: MainRepositoryViewComponent },
      { path: 'software', component: SoftwareComponent },
      { path: 'software-profiles', component: SoftwareProfileComponent },
      { path: 'operative-systems', component: OperativeSystemComponent },
      { path: 'menus', component: MenusComponent },
    ],
  },
  {
    path: 'auth',
    component: AuthLayoutComponent,
    children: [
      { path: 'login', component: LoginComponent },
    ],
  },
  { path: '**', component: PageNotFoundComponent },
];

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