/*
 * Copyright (C) 2018 Robert Bosch GmbH Copyright (C) 2018 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatListModule } from '@angular/material/list';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatTableModule } from '@angular/material/table';
import { MatTabsModule } from '@angular/material/tabs';
import { BciSharedModule } from '@bci-web-core/core';
import {
  GenericMapsModule,
  LocationMapModule,
  LocationService,
  LocationStyleService,
  OpenLayersStyleFactory,
} from '@bci-web-core/maps';
import { CustomLocationStylesService } from './custom-location-styles.service';
import { LocationDemosRoutingModule } from './location-demos-routing.module';
import { LocationFormComponent } from './location-form/location-form.component';
import { DemoLocationLayersComponent } from './location-layers/demo-location-layers.component';
import { DemoLocationListComponent } from './location-list/demo-location-list.component';
import { LocationServiceMock } from './location-service-mock.service';

@NgModule({
  imports: [
    CommonModule,
    LocationMapModule,
    GenericMapsModule,
    BciSharedModule,
    LocationDemosRoutingModule,
    /* Angular Material */
    MatTableModule,
    MatTabsModule,
    MatCheckboxModule,
    MatListModule,
    MatIconModule,
    MatSnackBarModule,
    MatFormFieldModule,
    MatInputModule,
  ],
  providers: [
    OpenLayersStyleFactory,
    { provide: LocationService, useClass: LocationServiceMock },
    { provide: LocationStyleService, useClass: CustomLocationStylesService },
  ],
  declarations: [DemoLocationListComponent, DemoLocationLayersComponent, LocationFormComponent],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class LocationDemosModule {}
