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

import { Params } from '@angular/router';
import { Observable } from 'rxjs';
import { LocationLayer, LsLocation } from './model';

/**
 * Service for location entities.
 */
export abstract class LocationService {
  /**
   * Latest loaded set of locations.
   */
  public items: Observable<LsLocation[]>;
  /**
   * Latest loaded set of location layers.
   */
  public layers: Observable<LocationLayer[]>;
  /**
   * Number of locations in latest set.
   */
  public itemCount = 0;

  /**
   * Load a single location.
   * @param id Id of the location.
   * @returns The location.
   */
  /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
  querySingle(id: string): Observable<LsLocation> {
    return undefined;
  }

  /**
   * Load a set of locations.
   * @param params Parameters to query the persistence with.
   * @returns Set of locations.
   */
  /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
  queryAll(params?: Params): Observable<LsLocation[]> {
    return undefined;
  }

  /**
   * Load all map layers
   * @param params
   * @returns Collection of map layers
   */
  /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
  queryAllLayers(params?: Params): Observable<LocationLayer[]> {
    return undefined;
  }

  /**
   * Update or insert a location.
   * @param entity The location.
   * @returns The persisted location.
   */
  /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
  upsert(entity: LsLocation): Observable<LsLocation> {
    return undefined;
  }

  /**
   * Remove a set of location.
   * @param entities The set of locations to be removed.
   */
  /* eslint-disable-next-line no-empty-function, @typescript-eslint/no-unused-vars */
  remove(entities: LsLocation[]): void {}
}
