import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { SystemAdminsComponent } from './system-admins.component';
import { SystemAdminsListComponent } from './system-admins-list/system-admins-list.component';
import { SystemAdminsAddComponent } from './system-admins-add/system-admins-add.component';

const routes: Routes = [
    {path: '',  component: SystemAdminsComponent, children: [
        {path: '', redirectTo: 'listView', pathMatch: 'full'},
        {path: 'listView', component: SystemAdminsListComponent},
        {path: 'add', component: SystemAdminsAddComponent},
        {path: 'edit/:adminId', component: SystemAdminsAddComponent},
        {path: '**', redirectTo: 'listView', pathMatch: 'full'},
      ]},
];

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

export class SystemAdminsRoutingModule{ }