import { NgModule } from '@angular/core';
import { CommonModule, LocationStrategy, PathLocationStrategy } from '@angular/common';
import { FullComponent } from './shared/components/layout/full/full.component';
import { ContentComponent } from './shared/components/layout/content/content.component';
import { AdminRoutingModule } from './admin-routing.module';
import { SharedModule } from './shared/shared.module';
import { HeaderComponent } from './shared/components/header/header.component';
import { SidebarComponent } from './shared/components/sidebar/sidebar.component';
import { MyAccountComponent } from './shared/components/header/elements/my-account/my-account.component';
// import { LanguagesComponent } from './components/languages/languages.component';
import { SearchComponent } from './shared/components/header/elements/search/search.component';
import { LanguagesComponent } from './shared/components/header/elements/languages/languages.component';
import { AuthGuard } from './shared/auth.guard';
import { NgxSpinnerModule } from 'ngx-spinner';
import { ToastrModule } from 'ngx-toastr';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';



@NgModule({
  declarations: [
    FullComponent,
    ContentComponent,
    HeaderComponent,
    SidebarComponent,
    MyAccountComponent,
    LanguagesComponent,
    SearchComponent,
  ],
  imports: [
    CommonModule,
    SharedModule,
    AdminRoutingModule,
    NgxSpinnerModule,
  ],
  providers: [{
    provide: LocationStrategy,
    useClass: PathLocationStrategy,
  }, AuthGuard]
})
export class AdminModule {
  constructor() {

    const link2 = document.createElement('link');
    link2.rel = 'stylesheet';
    link2.href = 'assets/admin/scss/indigo-pink.css';
    document.head.insertBefore(link2, document.head.firstChild);

    const link1 = document.createElement('link');
    link1.rel = 'stylesheet';
    link1.href = 'assets/admin/scss/bootstrap4.css';
    document.head.insertBefore(link1, document.head.firstChild);  
    

  }
}
