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

import { Injectable } from '@angular/core';
import { CoreConfig } from './core-config';
import { CoreConfigurationLoaderService } from './core-configuration-loader.service';

@Injectable({
  providedIn: 'root',
})
export class CoreConfigurationService {
  private readonly _configPromise: Promise<CoreConfig>;

  constructor(private loader: CoreConfigurationLoaderService) {
    this._configPromise = loader.config;
  }

  get configPromise(): Promise<CoreConfig> {
    return this._configPromise;
  }
}
