import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ListCustomerComponent } from './list-customer/list-customer.component';
import { CreateCustomerComponent } from './create-customer/create-customer.component';
import { EditCustomerComponent } from './edit-customer/edit-customer.component';
import { RouterModule, Routes } from '@angular/router';
import { KendoModule } from '../../shared/kendo.module';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { CustomerService } from 'src/app/services/customer.service';
import { AppBarComponent } from '../components/app-bar/app-bar.component';
import { LoadingComponent } from 'src/app/shared/messages/loading/loading.component';
import { ComponentModule } from 'src/app/components/component.module';

const routes: Routes = [{ path: 'customer', component: ListCustomerComponent },
                        { path: 'customer/create', component: CreateCustomerComponent },
                        { path: 'customer/edit/:id', component: EditCustomerComponent },
                      ];

@NgModule({
  declarations: [ListCustomerComponent, CreateCustomerComponent, EditCustomerComponent],
  imports: [
    CommonModule,
    KendoModule,
    FormsModule,
    ReactiveFormsModule,
    ComponentModule,
    RouterModule.forChild(routes),
  ],
  providers: [CustomerService]
})
export class CustomerModule { }
