var Feedback = {};
Feedback.holder;

Feedback.init = function (obj, containment) {
	Feedback.holder = obj;
	Feedback.holder.hide();

	Feedback.holder.find("#feedbackHeader span").css("pointer-events", "none");
	Feedback.holder.css("position", "absolute");
	let _close_btn = Feedback.holder.find("#feedbackClose");
	_close_btn.unbind();
	_close_btn.off("click").on("click", function () {
		let _btn = $(this);
		if (!_btn.hasClass('disabled')) {
			Feedback.closeFeedback();
		}
	});

	_close_btn.off("keyup").on("keyup", function (e) {

		e.stopPropagation();
		let _btn = $(this);
		if (_btn.hasClass('active')) {
			var KeyID = e.keyCode;
			switch (KeyID) {
				case 32:
					_btn.trigger('click');
					break;
				case 13:
					_btn.trigger('click');
					break;
				default:
					break;
			}
		}
	})
}

Feedback.showFeedback = function (str) {
	Feedback.holder.find("#feedbackContent").html(str);
	Feedback.holder.show();
	Feedback.holder.find("#feedbackContent").scrollTop(0);
}
Feedback.orientationChange = function () {
}
Feedback.hideFeedback = function () {
	Feedback.holder.hide();
}


Feedback.closeFeedback = function () {
	Feedback.holder.hide();
	$(Feedback).trigger({
		type: "feedbackClosed",
		value: "none"
	});
};
Feedback.feedbackDragStart = function (evt, ui) { }
Feedback.feedbackDragStop = function () { }