import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CollectionEditComponent } from './collection-edit/collection-edit.component';
import { CreateCollectionComponent } from './create-collection/create-collection.component';
import { PageCollectionComponent } from './page-collection/page-collection.component';
import { PageRoleComponent } from './page-role/page-role.component';
import { PageTextbookComponent } from './page-textbook/page-textbook.component';
import { PageUserComponent } from './page-user/page-user.component';
import { ProcessCreateComponent } from './process-create/process-create.component';
import { UserEditComponent } from './user-edit/user-edit.component';
const routes: Routes = [
  {
    path: '',
    redirectTo:'manage/user',
    pathMatch: "full",
  },
  {
    path: 'manage',
    children:[
      {
        path: 'collection', //合集列表
        component: PageCollectionComponent,
      },
      {
        path: 'collection/create', //创建&管理合集
        component: CreateCollectionComponent,
      },
      {
        path: 'collection/edit', //合集编辑
        component: CollectionEditComponent,
      },
      {
        path: 'process/create', //合集编辑
        component: ProcessCreateComponent,
      },
      {
        path: 'allcollection', //合集列表
        component: PageTextbookComponent,
      },
      {
        path: 'user', //用户列表
        component: PageUserComponent,
      },
      {
        path: 'user/edit', //用户管理&编辑
        component: UserEditComponent,
      },
      {
        path: 'role', //列表
        component: PageRoleComponent,
      },
    ]
  }
  
];
@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class NavAdminRoutingModule {}
