import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { PublicationsPage } from './publications.page';

const routes: Routes = [
  {
    path: '',
    component: PublicationsPage
  },
  {
    path: 'new-publication',
    loadChildren: () => import('./new-publication/new-publication.module').then( m => m.NewPublicationPageModule)
  },
  {
    path: 'gallery',
    loadChildren: () => import('./gallery/gallery.module').then( m => m.GalleryPageModule)
  },
  {
    path: 'new-action',
    loadChildren: () => import('./new-action/new-action.module').then( m => m.NewActionPageModule)
  },
  {
    path: 'view-publications',
    children: [
      {
        path:'',
        loadChildren: ()=> import('./view-publications/view-publications.module').then(m => m.ViewPublicationsPageModule)
      },
      {
        path:'publication-detail',
        loadChildren: ()=> import('./view-publications/publication-detail/publication-detail.module').then(m => m.PublicationDetailPageModule)
      },
    ]
  },
  {
    path: 'edit-action',
    loadChildren: () => import('./edit-action/edit-action.module').then( m => m.EditActionPageModule)
  }

];

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