import { BrowserModule } from '@angular/platform-browser';
import { NgModule  } from '@angular/core';
import { ToastrModule } from 'ngx-toastr';
import { AngularDraggableModule } from 'angular2-draggable';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ModalModule } from 'ngx-bootstrap/modal';
import { FileBrowserModalComponent } from './file-browser-modal/file-browser-modal.component';
import { MatchService } from './match.service';
import { AceEditorDirective } from './ace-editor.directive';
import { WorkareaComponent } from './workarea/workarea.component';

import { FormsModule } from '@angular/forms'; // Import this
import { HttpClientModule } from '@angular/common/http';  // Add this line

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MatchresultComponent } from './matchresult/matchresult.component';

import {CKEditorModule} from 'ckeditor4-angular';
import { PreviewDialogComponent } from './preview-dialog/preview-dialog.component';
import { ConfirmDialogComponent } from './confirm-dialog/confirm-dialog.component';
import { XmlValidatorComponent } from './xml-validator/xml-validator.component';
import { FileComparisonComponent } from './file-comparison/file-comparison.component';
import { AceEditorComponent } from './ace-editor/ace-editor.component';
import { TextCompareComponent } from './text-compare/text-compare.component';
import { CompareFilesComponent } from './compare-files/compare-files.component';
import { SafePipe } from './safe.pipe';
import { PdfViewerModule } from 'ng2-pdf-viewer';
import { NgxSpinnerModule } from 'ngx-spinner';
 
@NgModule({
  declarations: [
    AppComponent,
    FileBrowserModalComponent,
    AceEditorDirective,
    WorkareaComponent,
    MatchresultComponent,
    PreviewDialogComponent,
    ConfirmDialogComponent,
    XmlValidatorComponent,
    FileComparisonComponent,
    AceEditorComponent,
    TextCompareComponent,
    CompareFilesComponent,
    SafePipe
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    FormsModule,
    PdfViewerModule,
    HttpClientModule,
    BrowserAnimationsModule,
    AngularDraggableModule,
    ModalModule.forRoot(),
    ToastrModule.forRoot(),
    CKEditorModule,
    NgxSpinnerModule
  ],
  providers: [MatchService],
  bootstrap: [AppComponent],
  entryComponents: [FileBrowserModalComponent, PreviewDialogComponent, ConfirmDialogComponent], 
})
export class AppModule { }
