/** @file
 * @author Edouard DUPIN
 * @copyright 2018, Edouard DUPIN, all right reserved
 * @license PROPRIETARY (see license file)
 */

import { BrowserModule } from '@angular/platform-browser';
import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { HttpClientModule } from '@angular/common/http';
import { AppRoutingModule } from './app-routing.module';

import { ElementTypeComponent } from './component/element-type/element-type';
import { ElementSeriesComponent } from './component/element-series/element-series';
import { ElementSeasonComponent } from './component/element-season/element-season';
import { ElementVideoComponent } from './component/element-video/element-video';

import { PopInCreateType } from './popin/create-type/create-type';

import { AppComponent } from './app.component';
import {
	HomeScene, HelpScene, TypeScene, SeriesScene, SeasonScene, VideoScene, SettingsScene,
	VideoEditScene, SeasonEditScene, SeriesEditScene,
} from './scene';
import {
	DataService,
	AdvancementService,
	MediaService,
	SeasonService,
	SeriesService,
	TypeService,
	ArianeService,
} from './service';
import { UploadScene } from './scene/upload/upload';
import { KarCWModule } from '@kangaroo-and-rabbit/kar-cw';
import { environment } from 'environments/environment';

import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { CommonModule } from '@angular/common';
import { FileDragNDropDirective } from './scene/upload/file-drag-n-drop.directive';

@NgModule({
	declarations: [
		ElementTypeComponent,
		ElementSeriesComponent,
		ElementSeasonComponent,
		ElementVideoComponent,

		AppComponent,
		PopInCreateType,

		HomeScene,
		HelpScene,
		TypeScene,
		SeriesScene,
		SeasonScene,
		VideoScene,
		SettingsScene,
		VideoEditScene,
		SeasonEditScene,
		SeriesEditScene,
		UploadScene,
		FileDragNDropDirective,
	],
	imports: [
		FormsModule,
		ReactiveFormsModule,
		CommonModule,

		BrowserModule,
		RouterModule,
		AppRoutingModule,
		HttpClientModule,
		KarCWModule,
	],
	providers: [
		{ provide: 'ENVIRONMENT', useValue: environment },
		DataService,
		AdvancementService,
		MediaService,
		SeasonService,
		SeriesService,
		TypeService,
		ArianeService,
	],
	exports: [
		AppComponent,
		ElementTypeComponent,
		ElementSeriesComponent,
		ElementSeasonComponent,
		ElementVideoComponent,
		PopInCreateType,
	],
	bootstrap: [
		AppComponent
	],
	schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
})
export class AppModule { }
