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

import { LayoutComponent } from '../../shared/layout/layout.component';
import { SalesPageComponent } from './sales-page/sales-page.component';
import { SaleDetailPageComponent } from './sales-page/sale-detail-page/sale-detail-page.component';

const routes: Routes = [
  {
    path: '',
    component: LayoutComponent,
    children: [
      { path: '', component: SalesPageComponent },
      { path: 'detail/:id', component: SaleDetailPageComponent },
    ]
  }
];

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