import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { LayoutPageComponent } from './pages/layout-page/layout-page.component';
import { NivelesEducativosComponent } from './pages/niveles-educativos/niveles-educativos.component';
import { CatalogoUsuariosComponent } from './pages/catalogo-usuarios/catalogo-usuarios.component';
import { GradosEducativosComponent } from './pages/grados-educativos/grados-educativos.component';
import { PersonalizarComponent } from './pages/personalizar/personalizar.component';
import { GruposComponent } from './pages/grupos/grupos.component';
import { MateriasComponent } from './pages/materias/materias.component';
import { CategoriasMateriasComponent } from './pages/categorias-materias/categorias-materias.component';
import { MainComponent } from './pages/main/main.component';
import { CalendarComponent } from './pages/calendar/calendar.component';

import { ConfiguracionComponent } from './pages/configuracion/configuracion.component';
import { TiposTareasComponent } from './pages/modulos/tiposTareas/tipos-tareas.component';
import { AlumnosPadresComponent } from './pages/Relacionar/alumnos-padres/alumnos-padres.component';
import { ProfesorMateriasComponent } from './pages/Relacionar/profesor-materias/profesor-materias.component';
import { CircularesComponent } from './pages/circulares/circulares.component';


const routes: Routes = [
    {
        path: '', component: LayoutPageComponent, children: [


            { path: 'main', component: MainComponent },

            //módulo configuración
            { path: 'catalogoUsuarios', component: CatalogoUsuariosComponent },
            { path: 'nivelesEducativos', component: NivelesEducativosComponent },
            { path: 'gradosEducativos', component: GradosEducativosComponent },
            { path: 'grupo', component: GruposComponent },
            { path: 'materias', component: MateriasComponent },
            { path: 'categoriasMaterias', component: CategoriasMateriasComponent },
            { path: 'calendar', component: CalendarComponent },

            { path: 'configuracion', component: ConfiguracionComponent },
            { path: 'alumnos-padres', component: AlumnosPadresComponent },
            { path: 'profesores-materias', component: ProfesorMateriasComponent },
            { path: 'tipoTarea', component: TiposTareasComponent },

            { path: 'personalizar', component: PersonalizarComponent },

            //módulo adminitración escolar
            { path: 'circulares', component: CircularesComponent },


            { path: '', redirectTo: 'main', pathMatch: 'full' },
            { path: '**', redirectTo: '404' },

        ]
    },

];

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