import { FooterComponent } from './dashboard/main-footer/footer.component';
import { HeaderComponent } from './dashboard/header/header.component';

import { MainMenuService } from './shared/main-menu.service';
import { InternalSerService } from './shared/internal-ser.service';
import { FooterService } from './shared/footer.service';
import { NewService } from './shared/new.service';
import { AchievementsService } from './shared/achievements.service';
import { ExternalSerService } from './shared/external-ser.service';
import { EventService } from './shared/event.service';
import { HospitalService } from './shared/hospital.service';
import { ReportService } from './shared/report.service';
import { SectionService } from './shared/section.service';
import { HashLocationStrategy, LocationStrategy } from '@angular/common';

import { DepartmentService } from './shared/department.service';
import { DepartmentListComponent } from './dashboard/department/department-list/department-list.component';
import { AuthGuardService } from './shared/auth-guard.service';
import { UserService } from './shared/user.service';
import { ResponceInterceptService } from './shared/responce-intercept.service';
import { TokenInterceptorService } from './shared/token-interceptor.service';
import { BrowserModule } from '@angular/platform-browser';

import { registerLocaleData } from '@angular/common';
import localeFr from '@angular/common/locales/ar';
import { NgModule} from '@angular/core';


import { QuillModule } from 'ngx-quill';

import { MomentModule } from 'ngx-moment';

import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import { SlideMenuModule } from 'cuppa-ng2-slidemenu/cuppa-ng2-slidemenu';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HttpModule } from '@angular/http';
import { HttpClientModule } from '@angular/common/http';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
import { LoginComponent } from './login/login.component';
import { RegesterComponent } from './regester/regester.component';
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
import { AuthServiceService } from './shared/auth-service.service';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { DashboardComponent } from './dashboard/dashboard/dashboard.component';
import { ServiceItemComponent } from './dashboard/service-item/service-item.component';
import { UsersComponent } from './dashboard/users/users.component';
import { FormUserComponent } from './dashboard/users/form-user/form-user.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ToastrModule } from 'ngx-toastr';
import { NgxSpinnerModule } from 'ngx-spinner';
import {NgxPaginationModule} from 'ngx-pagination';
import { FiltterPipePipe } from './filtter-pipe.pipe';
import { RolesService } from './shared/roles.service';
import { RolesListComponent } from './dashboard/roles/roles-list/roles-list.component';
import { AddRolesComponent } from './dashboard/roles/add-roles/add-roles.component';
import { AddDepartmentComponent } from './dashboard/department/add-department/add-department.component';
import { SectionListComponent } from './dashboard/sections/section-list/section-list.component';
import { AddSectionComponent } from './dashboard/sections/add-section/add-section.component';
import { UserPermissionComponent } from './dashboard/users/user-permission/user-permission.component';
import { AlifeFileToBase64Module } from 'alife-file-to-base64';
import { UserReportComponent } from './dashboard/users/user-report/user-report.component';
import { RoleReportComponent } from './dashboard/roles/role-report/role-report.component';
import { RoleReport2Component } from './dashboard/roles/role-report2/role-report2.component';
import { ReportsPageComponent } from './dashboard/reports-page/reports-page.component';
import { ReportListComponent } from './dashboard/report-list/report-list.component';
import { EnglishCharactersDirective } from './shared/english-characters.directive';
import { OnlyNumberDirective } from './shared/only-number.directive';
import { HospitalListComponent } from './dashboard/hospitals/hospital-list/hospital-list.component';
import { AddHospitalComponent } from './dashboard/hospitals/add-hospital/add-hospital.component';
import { EventsComponent } from './dashboard/events/events.component';
import { AddEventComponent } from './dashboard/events/add-event/add-event.component';
import { ExternalListComponent } from './dashboard/external-services/external-list/external-list.component';
import { AddExternalComponent } from './dashboard/external-services/add-external/add-external.component';
import { AchievementComponent } from './dashboard/achievements/achievement-list/achievement.component';
import { AddAchievementComponent } from './dashboard/achievements/add-achievement/add-achievement.component';
import { TabListComponent } from './dashboard/tabs/tab-list/tab-list.component';
import { AddTabComponent } from './dashboard/tabs/add-tab/add-tab.component';
import { NewsListComponent } from './dashboard/news/news-list/news-list.component';
import { AddNewsComponent } from './dashboard/news/add-news/add-news.component';
import { FooterListComponent } from './dashboard/footer/footer-list/footer-list.component';
import { AddFooterComponent } from './dashboard/footer/add-footer/add-footer.component';
import { InternalServicesComponent } from './dashboard/internal-services/internal-services.component';
import { AddInternalServicesComponent } from './dashboard/internal-services/add-internal-services/add-internal-services.component';
import { LecturesListComponent } from './dashboard/lectures/lectures-list/lectures-list.component';
import { AddLectureComponent } from './dashboard/lectures/add-lecture/add-lecture.component';
import { MainListComponent } from './dashboard/main-menu/main-list/main-list.component';
import { AddMenuComponent } from './dashboard/main-menu/add-menu/add-menu.component';
import { DashboardContent } from './dashboard/dashboard-content';
import { AddJoinUsComponent } from './dashboard/add-join-us/add-join-us.component';
import { InternalPageModule } from './Internal-Page/internal-page.module';
import { CollapsibleModule } from 'angular2-collapsible'; // <-- import the module

import { CalendarModule, DateAdapter } from 'angular-calendar';
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';




@NgModule({
  declarations: [
    AppComponent,
    HeaderComponent,
    FooterComponent,
    LoginComponent,
    RegesterComponent,
    PageNotFoundComponent,
    DashboardComponent,
    DashboardContent,
    ServiceItemComponent,
    ServiceItemComponent,
    UsersComponent,
    FormUserComponent,
    FiltterPipePipe,
    RolesListComponent,
    AddRolesComponent,
    DepartmentListComponent,
    AddDepartmentComponent,
    SectionListComponent,
    AddSectionComponent,
    UserPermissionComponent,
    UserReportComponent,
    RoleReportComponent,
    RoleReport2Component,
    ReportsPageComponent,
    ReportListComponent,
    EnglishCharactersDirective,
    OnlyNumberDirective,
    HospitalListComponent,
    AddHospitalComponent,
    EventsComponent,
    AddEventComponent,
    ExternalListComponent,
    AddExternalComponent,
    AchievementComponent,
    AddAchievementComponent,
    TabListComponent,
    AddTabComponent,
    NewsListComponent,
    AddNewsComponent,
    FooterListComponent,
    AddFooterComponent,
    InternalServicesComponent,
    AddInternalServicesComponent,
    LecturesListComponent,
    AddLectureComponent,
    MainListComponent,
    AddMenuComponent,
    AddJoinUsComponent,
  ],
  imports: [
    BrowserModule,
    FormsModule,
    ReactiveFormsModule,
    HttpModule,
    HttpClientModule,
    InternalPageModule,
    AppRoutingModule,
    SlideMenuModule,
    NgxSpinnerModule,
    NgxPaginationModule,
    MomentModule,
    AlifeFileToBase64Module,
    BrowserAnimationsModule,  // <-- include required BrowserAnimationsModule
    CollapsibleModule,
    ToastrModule.forRoot(), // ToastrModule added
    NgbModule.forRoot(),
    CalendarModule.forRoot({
      provide: DateAdapter,
      useFactory: adapterFactory
    }),
    QuillModule,
  ],
  providers: [AuthServiceService,
    TokenInterceptorService,
    UserService,
    AuthGuardService,
    RolesService,
    SectionService,
    DepartmentService,
    ReportService,
    HospitalService,
    EventService,
    NewService,
    FooterService,
    MainMenuService,
    ExternalSerService,
    AchievementsService,
    InternalSerService,
    {provide: LocationStrategy, useClass: HashLocationStrategy},
    ResponceInterceptService , {
      provide: HTTP_INTERCEPTORS,
      useClass: TokenInterceptorService,
      multi: true
    },
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
