"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = getImageUrl;
var _get = _interopRequireDefault(require("lodash/get"));
var _configuration = require("../configuration");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function getImageUrl(path) {
  if (!path) {
    return '';
  }
  var appConf = (0, _configuration.getConf)();
  var localResources = (0, _get["default"])(appConf, 'resources');
  if (localResources) {
    var localFile = (0, _get["default"])(localResources, path);
    if (localFile) {
      return localFile;
    }
  }
  var resourcePath = (0, _get["default"])(appConf.network, 'resourcesURL', '');
  return "".concat(resourcePath).concat(path);
}