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

import { Location } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { ImprintModel } from './imprint.model';

@Injectable({
  providedIn: 'root',
})
export class BciImprintDetailsService {
  constructor(private httpClient: HttpClient, private location: Location) {}

  /**
   * Get imprint details for imprint view.
   */
  getImprintDetails(): Observable<ImprintModel> {
    return this.httpClient.get<ImprintModel>(this.location.prepareExternalUrl('/assets/imprint-details.json'));
  }
}
