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

import { PagesComponent } from './pages.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { UsersComponent } from './users/users.component';
import { CustomerComponent } from './customer/customer.component';
import { DriverComponent } from './driver/driver.component';
import { ProductComponent } from './product/product.component';
import { AuthGuard } from './_guard/auth.guard';
import { OrderComponent } from './order/order.component';
import { OrderFormComponent } from './order/order-form/order-form.component';
import { ProfileComponent } from './profile/profile.component';

const routes: Routes = [{
  path: '',
 
  component: PagesComponent,
  children: [
    {
      path: 'dashboard',
      component: DashboardComponent,
    },
    {
      path: 'users',
      component: UsersComponent,
    },

    {
      path: 'customer',
      component: CustomerComponent,
    },
    
    {
      path: 'driver',
      component: DriverComponent,
    },
    {
      path: 'product',
      component: ProductComponent,
    },
    {
      path: 'order',
      component: OrderComponent,
    },
    {
      path: 'profile',
      component: ProfileComponent,
    },
    {
      path: 'order/add',
      component: OrderFormComponent,
    },

    
 
  ],
}];

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