import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
import { PartnerComponent } from './create/partner/partner.component';
import { PartnersComponent } from './home/partners.component';
import { PartnerRangeComponent } from './range/partner-range/partner-range.component';
import { ParnterCategoryHomeComponent } from './parnter-category-home/parnter-category-home.component';
import { ParnterCategoryCreateComponent } from './parnter-category-create/parnter-category-create.component';
import { PartnerMenuComponent } from './partner-menu/partner-menu.component';
import { CommissionComponent } from './reports/commission/commission.component';
import { PaymentComponent } from './payment/payment.component';
import { ExtractPartnerComponent } from './reports/extract-partner/extract-partner.component';

const routes: Routes = [
  {
    path: '', component: PartnerMenuComponent,
    children: [
      { path: 'list', component: PartnersComponent },
      { path: 'create', component: PartnerComponent },
      { path: 'category', component: ParnterCategoryHomeComponent },
      { path: 'payment', component: PaymentComponent },
      { path: 'report/commission', component: CommissionComponent },
      { path: 'category/create', component: ParnterCategoryCreateComponent },
      { path: 'category/edit/:id', component: ParnterCategoryCreateComponent },
      { path: 'range', component: PartnerRangeComponent },
      { path: 'edit/:cpf', component: PartnerComponent },
      { path: 'report/extract', component: ExtractPartnerComponent },
    ]
  },

];


@NgModule({
  declarations: [],
  imports: [
    CommonModule,
    RouterModule.forChild(routes)
  ]
})

export class PartnerRoutingModule { }
