import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
// import { CollectionEditComponent } from './collection/collection-edit/collection-edit.component';
// import { CreateCollectionComponent } from './collection/create-collection/create-collection.component';
// import { PageCollectionComponent } from './collection/page-collection/page-collection.component';
import { ProcessListComponent } from './page-process/process-list/process-list.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 './page-process/process-create/process-create.component';
import { UserEditComponent } from './user-edit/user-edit.component';
import { PageProcessComponent } from './page-process/page-process.component';
import { TextbookDetailsComponent } from '../common/textbook-details/textbook-details.component';
import { UserCreateComponent } from './page-user/user-create/user-create.component';
const routes: Routes = [
  {
    path: '',
    redirectTo:'manage/textbook',
    pathMatch: "full",
  },
  {
    path: 'manage',
    children:[
      {
        path: 'process', //流程申报
        component: ProcessListComponent,
      },
      {
        path: 'process/create', //创建流程
        component: ProcessCreateComponent,
      },
      {
        path: 'process/page', //流程详情
        component: PageProcessComponent,
      },
      // {
      //   path: 'collection', //合集列表
      //   component: PageCollectionComponent,
      // },
      // {
      //   path: 'collection/create', //创建&管理合集
      //   component: CreateCollectionComponent,
      // },
      // {
      //   path: 'collection/edit', //合集编辑
      //   component: CollectionEditComponent,
      // },

      {
        path: 'textbook', //全部教材
        component: PageTextbookComponent,
      },
      {
        path: 'user', //用户列表
        component: PageUserComponent,
      },
      {
        path: 'user/edit', //用户管理&编辑
        component: UserEditComponent,
      },
      {
        path: 'user/create', //创建用户
        component: UserCreateComponent,
      },
      {
        path: 'role', //组织列表
        component: PageRoleComponent,
      },
      {
        path: 'textbook/details/:id', //教材详情
        component: TextbookDetailsComponent,
      },
    ]
  }
  
];
@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class NavAdminRoutingModule {}
