import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {SharedModule} from '../../shared/shared.module';
import {RouterModule, Routes} from '@angular/router';
import { StudentInfoRouter } from './router/router';
import { ListComponent } from './presenter/list/list.component';
import { SearchComponent } from './presenter/search/search/search.component';
import { StudentInfoContainer } from './container/student-info/student-info.container';
import { FormComponent } from './presenter/form/form/form.component';

const routes: Routes = [
    {
        path: '',
        component: StudentInfoRouter,
        children: [
            {
                path: '',
                component: StudentInfoContainer
            },
            {
                path: 'edit/:id',
                component: FormComponent
            },
        ]
    }
];

@NgModule({
    declarations: [
        StudentInfoContainer,
        StudentInfoRouter,
        ListComponent,
        SearchComponent,
        FormComponent
    ],
    imports: [
        CommonModule,
        SharedModule,
        RouterModule.forChild(routes),
    ]
})
export class StudentInfoModule { }
