import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from 'src/modules/craftsmart/home/home.component';
import { NavTabsComponent } from 'src/modules/craftsmart/nav-tabs/nav-tabs.component';
import { PageCartComponent } from 'src/modules/craftsmart/page-cart/page-cart.component';
import { PageChatPanelComponent } from 'src/modules/craftsmart/page-chat-panel/page-chat-panel.component';
import { PageItemDetailComponent } from 'src/modules/craftsmart/page-item-detail/page-item-detail.component';
import { PageLoginComponent } from 'src/modules/craftsmart/page-login/page-login.component';
import { PageMineComponent } from 'src/modules/craftsmart/page-mine/page-mine.component';


const routes: Routes = [
   {path:"",redirectTo:"/craftsmart/home",pathMatch:"full" },
   {path:'craftsmart', loadChildren:() => import('../modules/craftsmart/craftsmart.module').then(m => m.CraftsmartModule)},
   { path: 'home', component: HomeComponent },
   { path: 'nav-tabs', component: NavTabsComponent },
   { path: 'page-cart', component: PageCartComponent },
   { path: 'page-mine', component: PageMineComponent },
   { path: 'page-login', component: PageLoginComponent },
   {path:'page-item-detail/:name',component:PageItemDetailComponent},
   {path:'page-chat-panel',component:PageChatPanelComponent}
];

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