import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
import { ReactiveFormsModule } from '@angular/forms';

// Shared components
import { SharedModule } from '../../shared/shared.module';

// Module components
import { FinanceTestComponent } from './finance-test.component';
import { FinanceDiagnosticComponent } from './finance-diagnostic.component';

// Services
import { FinanceService } from './services/finance.service';

// Routes du module Finance
const routes: Routes = [
  { path: 'test', component: FinanceTestComponent },
  { path: 'diagnostic', component: FinanceDiagnosticComponent },
  { path: '', redirectTo: 'test', pathMatch: 'full' }
];

@NgModule({
  declarations: [
    FinanceTestComponent,
    FinanceDiagnosticComponent
  ],
  imports: [
    CommonModule,
    ReactiveFormsModule,
    RouterModule.forChild(routes),
    SharedModule
  ],
  providers: [
    FinanceService
  ]
})
export class FinanceModule { }


