import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
import { AiAgentPage } from './ai-agent/ai-agent.page';
import { CreateRequestPage } from './tab2/create-request.page';

const routes: Routes = [
  {
    path: '',
    loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
  },
  { path: 'create-request', component: CreateRequestPage } ,
  
  {
    path: 'tab5',
    loadChildren: () => import('./tab5/tab5.module').then( m => m.Tab5PageModule)
  },
  { path: 'ai-agent', component: AiAgentPage },
  {
    path: 'chat/:username',
    loadChildren: () => import('./chat/chat.module').then(m => m.ChatPageModule)
  }
];
@NgModule({
  imports: [
    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
  ],
  exports: [RouterModule]
})
export class AppRoutingModule { }

