{"size": 775, "ext": "js", "max_stars_repo_path": "app/lib/client-config/index.js", "max_stars_repo_name": "drjagan/clinicalguidelinesmodeller", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/lib/client-config/index.js", "max_issues_repo_name": "drjagan/clinicalguidelinesmodeller", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/lib/client-config/index.js", "max_forks_repo_name": "drjagan/clinicalguidelinesmodeller", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.3947368421, "max_line_length": 81, "alphanum_fraction": 0.6619354839}
'use strict';

var NoneProvider = require('./providers/none-provider');

var ElementTemplatesProvider = require('./providers/element-templates-provider');


/**
 * A way to allow clients to retrieve configuration
 * at run-time.
 *
 * @param {ElectronApplication} app
 */
function ClientConfig(app) {

  this._providers = {
    '_': new NoneProvider(),
    'bpmn.elementTemplates': new ElementTemplatesProvider(app)
  };

  /**
   * Retrieve a configuration entry.
   *
   * @param {String} key
   * @param {Object...} args
   * @param {Function} callback
   *
   * @return {Object}
   */
  this.get = function(key) {

    var provider = this._providers[key] || this._providers['_'];

    return provider.get.apply(provider, arguments);
  };
}

module.exports = ClientConfig;