import { LocalizedStrings } from '../../services/localizedStringsService';
import * as CommandsManagement from '../commands';
export function createFloatingCommand () {
	return $('
');
}
export function renderCommand (command, function_obj) {
	var el = $('   '+LocalizedStrings.getUI('text_break')+' 
');
	el.data('command', command);
	addHandlers(command, function_obj, el);
	return el;
}
function addHandlers (command, function_obj, break_dom) {
	break_dom.find('.button_remove_command').on('click', function() {
		if (CommandsManagement.removeCommand(command, function_obj, break_dom)) {
			break_dom.fadeOut(400, function() {
				break_dom.remove();
			});
		}
	});
}