import { CommonModule, LocationStrategy, PathLocationStrategy } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgxSpinnerModule } from 'ngx-spinner';
import { FooterComponent } from './components/footer/footer.component';
import { HeaderComponent } from './components/header/header.component';
import { LayoutComponent } from './components/layout/layout.component';
import { MaterialModule } from './shared/directives/material.module';
import { WebsiteRoutingModule } from './website-routing.module';
import { NavigationEnd, NavigationError, Router, RouterModule } from '@angular/router';



@NgModule({
  declarations: [
    LayoutComponent,
    HeaderComponent,
    FooterComponent
  ],
  imports: [
    CommonModule,
    WebsiteRoutingModule,
    FormsModule,
    MaterialModule,
    NgxSpinnerModule,
    ReactiveFormsModule,
    RouterModule
  ],
  providers: [{
    provide: LocationStrategy,
    useClass: PathLocationStrategy
  }]
})
export class WebsiteModule {
  constructor() {

    const link1 = document.createElement('link');
    link1.rel = 'stylesheet';
    link1.href = 'assets/website/css/bootstrap.min.css';
    document.head.insertBefore(link1, document.head.firstChild);

    const link = document.createElement('link');
    link.rel = 'stylesheet';
    link.href = 'assets/website/css/style.css';
    document.head.insertBefore(link, document.head.firstChild);

  }
}
