import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { NgModule } from "@angular/core";
import { RouterModule } from "@angular/router";
import { CommonModule } from "@angular/common";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { AngularMyDatePickerModule } from "angular-mydatepicker";
import { HttpClientModule, HttpClient } from "@angular/common/http";

import { AdminLayoutRoutes } from "./admin.routing";
import { DashboardComponent } from "../../components/dashboard/dashboard.component";
import { ProfileComponent } from "../../components/profile/profile.component";

import { PluginsModule } from "../../components/plugins/plugins.module";

import { MatDialogModule } from "@angular/material";
import { BrowserModule } from "@angular/platform-browser";
import { NoopAnimationsModule } from "@angular/platform-browser/animations";

import { MatTableExporterModule } from "mat-table-exporter";
import {
  MatButtonModule,
  MatInputModule,
  MatRippleModule,
  MatFormFieldModule,
  MatSelectModule,
  MatExpansionModule,
  MatTableModule,
  MatPaginatorModule,
  MatProgressSpinnerModule,
  MatSortModule
} from "@angular/material";

import { MatPasswordStrengthModule } from "@angular-material-extensions/password-strength";
import {
  BreadcrumbModule,
  IconsModule,
  WavesModule
} from "angular-bootstrap-md";

import { TermsComponent } from "@app/components/terms/terms.component";
import { InvestmentProposalsComponent } from "@app/components/investment-proposals/investment-proposals.component";
import { InvestmentProposalGeneralInfoComponent } from "@app/components/investment-proposals/general-info/general-info.component";

import { InvestmentsComponent } from "@app/components/investments/investments.component";
import { ArbitrationsComponent } from "@app/components/arbitrations/arbitrations.component";
import { PerformancesComponent } from "@app/components/performances/performances.component";
import { FormInvestmentProposalService } from "@app/services/form-investment-proposal.service";
import { InvestmentProposalWorkflowService } from "@app/services/investment-proposal-workflow.service";
import { ComplementInfoComponent } from "@app/components/investment-proposals/complement-info/complement-info.component";
import { InstrumentWorkComponent } from "@app/components/investment-proposals/instrument-work/instrument-work.component";
import { ResultComponent } from "@app/components/investment-proposals/result/result.component";
import { InvestmentProposalReviewComponent } from "@app/components/investment-proposals/review/review.component";

import { NavbarInvProposalComponent } from "@app/components/plugins/navbar-inv-proposals/navbar-inv-proposals";
import { LETE } from "@app/components/instruments/lete/lete.component";
import { CETE } from "@app/components/instruments/cete/cete.component";
import { VCN } from "@app/components/instruments/vcn/vcn.component";
import { PBUR } from "@app/components/instruments/pbur/pbur.component";

import { BonosComponent } from "@app/components/instruments/bonos/bonos.component";
import { DAP } from "@app/components/instruments/dap/dap.component";
import { ANCComponent } from "@app/components/instruments/anc/anc.component";
import { APNComponent } from "@app/components/instruments/apn/apn.component";

import { InstrumentDirective } from "@app/components/investment-proposals/instrument/instrument.directive";
import { WorkflowGuard } from "@app/services/investment-proposal-workflow.guard";
import { ChangeHistoryComponent } from "@app/components/investment-proposals/change-history/change-history.component";

import { PaymentRequirementComponent } from "@app/components/investment-proposals/payment-requirement/payment-requirement.component";
import { PaymentInfoComponent } from "@app/components/investment-proposals/payment-info/payment-info.component";
import { InvestmentProposalDetailComponent } from "@app/components/investment-proposals/proposal-detail/proposal-detail.component";

// This array defines which "componentId" maps to which lazy-loaded module.

@NgModule({
  imports: [
    CommonModule,
    RouterModule.forChild(AdminLayoutRoutes),

    FormsModule,
    ReactiveFormsModule,
    MatButtonModule,
    MatRippleModule,
    MatFormFieldModule,
    MatInputModule,
    MatSelectModule,
    MatExpansionModule,
    MatTableModule,
    MatPaginatorModule,
    MatProgressSpinnerModule,
    MatSortModule,
    MatTableExporterModule,
    PluginsModule,
    AngularMyDatePickerModule,
    MatPasswordStrengthModule,
    HttpClientModule,
    WavesModule
  ],
  providers: [
    WorkflowGuard,
    {
      provide: FormInvestmentProposalService,
      useClass: FormInvestmentProposalService
    },
    {
      provide: InvestmentProposalWorkflowService,
      useClass: InvestmentProposalWorkflowService
    }
  ],
  declarations: [
    DashboardComponent,
    ProfileComponent,
    TermsComponent,
    InvestmentProposalsComponent,
    InvestmentProposalGeneralInfoComponent,
    InvestmentProposalReviewComponent,
    ChangeHistoryComponent,
    InvestmentsComponent,
    ArbitrationsComponent,
    PerformancesComponent,
    ComplementInfoComponent,
    InstrumentWorkComponent,
    ResultComponent,
    NavbarInvProposalComponent,
    LETE,
    CETE,
    VCN,
    PBUR,
    BonosComponent,
    DAP,
    ANCComponent,
    APNComponent,
    InstrumentDirective,
    PaymentInfoComponent,
    PaymentRequirementComponent,
    InvestmentProposalDetailComponent
  ],
  entryComponents: [
    LETE,
    CETE,
    VCN,
    PBUR,
    BonosComponent,
    DAP,
    ANCComponent,
    APNComponent
  ]
})
export class AdminModule {}
