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

import { ChatPage } from './chat.page';
import { GroupMessagesPage } from './group-messages/group-messages.page';
import { MessagesPage } from './messages/messages.page';

const routes: Routes = [
  {
    path: '',
    component: ChatPage,
  },
  {
    path: 'new-group',
    loadChildren: () => import('./new-group/new-group.module').then( m => m.NewGroupPageModule)
  },
  {
    path: 'group-messages',
    loadChildren: () => import('./group-messages/group-messages.module').then( m => m.GroupMessagesPageModule)
  },
  {
    path: 'messages',
    outlet:'message',
    loadChildren: () => import('./messages/messages.module').then( m => m.MessagesPageModule)
  },
  {
    path: 'edit-group',
    loadChildren: () => import('./edit-group/edit-group.module').then( m => m.EditGroupPageModule)
  }

];

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