/**
* UI utility functions.
*
* @memberof module:libresignage/util
*/
class UIUtil {
	/**
	* Return a URI pointing to a Font-Awesome SVG icon.
	*
	* @param {string} type The type of the icon.
	* @param {string} name The name of the icon.
	*
	* @return {string} The requested URI.
	*/
	static fa_svg_uri(type, name) {
		return `/libs/@fortawesome/fontawesome-free/svgs/${type}/${name}.svg`;
	}

	/**
	* Common UI setup code.
	*/
	static setup_defaults() {
		// Setup Bootstrap tooltips.
		$('[data-toggle="tooltip"]').tooltip({
			'delay': {
				'show': 800,
				'hide': 50
			},
			'trigger': 'hover'
		});
	}
}
module.exports = UIUtil;
