/*
 * Copyright (c) OutWit Technologies 2007-2017.
 * All rights reserved.
 */

var helpManager = {
  _display:null,
  get display(){
    if(this._display == null)
      this._display = document.getElementById("owImagesContainer").thumbWindow.InfoManager;
    return this._display;
  }
};

/**
 * @name helpManager.display
 * Display some help for the interface
 * Can takes a variables number of arguments,
 * each one represent an entity
 */
helpManager.show = function(){
	var args = arguments;
	var self = this;
	mainKit.appUtils.getHub(function(hub) {
		var aBean = [];
		try{
			for(var i = 0 ; i<args.length ;i++){
				aBean.push( coreKit.localeService.getString(args[i], 'chrome://outwit-modules-images/locale/help.properties') );
			}
		}catch(e){
		//alert(e);
		}
		self.display.setText(aBean.join("\n"));
	});
}

/**
 * @name helpManager.hide
 * Hide the help
 */
helpManager.hide = function(){
  this.display.clean();
};
