import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {PartialsModule} from '../../partials/partials.module';
import {CoreModule} from '../../../core/core.module';
import {RouterModule} from '@angular/router';
import {
	MAT_DIALOG_DEFAULT_OPTIONS,
	MatAutocompleteModule,
	MatButtonModule,
	MatCardModule,
	MatCheckboxModule,
	MatDatepickerModule,
	MatDialogModule,
	MatExpansionModule,
	MatFormFieldModule,
	MatIconModule,
	MatInputModule,
	MatMenuModule,
	MatNativeDateModule,
	MatPaginatorModule,
	MatProgressBarModule,
	MatProgressSpinnerModule,
	MatRadioModule,
	MatSnackBarModule,
	MatSortModule,
	MatTableModule,
	MatTabsModule,
	MatTooltipModule,
	MatSelectModule
} from '@angular/material';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {NgxPermissionsModule} from 'ngx-permissions';
import {HttpUtilsService, InterceptService, LayoutUtilsService, TypesUtilsService} from '../../../core/_base/crud';
import {HTTP_INTERCEPTORS} from '@angular/common/http';
import {ActionNotificationComponent, DeleteEntityDialogComponent} from '../../partials/content/crud';
import { SolicitudesServicioListComponent } from './solicitudes-servicio/solicitudes-servicio-list/solicitudes-servicio-list.component';
import { SolicitudesServicioEditComponent } from './solicitudes-servicio/solicitudes-servicio-edit/solicitudes-servicio-edit.component';
import { ModalSetLitrajeComponent } from './solicitudes-servicio/modal-set-litraje/modal-set-litraje.component';
import { ModalEncuestaComponent } from './solicitudes-servicio/modal-encuesta/modal-encuesta.component';
import { HistorialCambiosComponent } from './solicitudes-servicio/historial-cambios/historial-cambios.component';
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';

@NgModule({
  declarations: [SolicitudesServicioListComponent, SolicitudesServicioEditComponent, ModalSetLitrajeComponent, ModalEncuestaComponent, HistorialCambiosComponent],
  imports: [
		CommonModule,
		PartialsModule,
		CoreModule,
		RouterModule.forChild([
			{
				path: 'solicitudes-servicio',
				component: SolicitudesServicioListComponent
			},
			{
				path: 'solicitudes-servicio/add',
				component: SolicitudesServicioEditComponent
			},
			{
				path: 'solicitudes-servicio/edit/:id',
				component: SolicitudesServicioEditComponent
			},
		]),
		MatButtonModule,
		MatTooltipModule,
		MatFormFieldModule,
		MatInputModule,
		MatIconModule,
		MatTableModule,
		MatMenuModule,
		MatCheckboxModule,
		MatSortModule,
		MatProgressSpinnerModule,
		MatPaginatorModule,
		FormsModule,
		ReactiveFormsModule,
		MatAutocompleteModule,
		MatRadioModule,
		MatNativeDateModule,
		MatProgressBarModule,
		MatDatepickerModule,
		MatCardModule,
		MatSnackBarModule,
		MatExpansionModule,
		MatTabsModule,
		MatDialogModule,
		NgxPermissionsModule,
		MatSelectModule,
		NgxMatSelectSearchModule
	],
	providers: [
		InterceptService,
		{
			provide: HTTP_INTERCEPTORS,
			useClass: InterceptService,
			multi: true
		},
		{
			provide: MAT_DIALOG_DEFAULT_OPTIONS,
			useValue: {
				hasBackdrop: true,
				panelClass: 'kt-mat-dialog-container__wrapper',
				height: 'auto',
				width: '900px'
			}
		},
		HttpUtilsService,
		TypesUtilsService,
		LayoutUtilsService,
	],
	entryComponents: [
		DeleteEntityDialogComponent,
		ActionNotificationComponent,
		ModalSetLitrajeComponent,
		ModalEncuestaComponent
	]
})

export class ServiciosModule { }
