define("qui/controls/messages/Loading",["qui/controls/messages/Message"],function(s){"use strict";return new Class({Extends:s,Type:"qui/controls/messages/Loading",options:{message:"",code:0,time:!1,cssclass:!1,styles:!1,percent:!1},initialize:function(s){this.setAttribute("cssclass","message-loading"),this.parent(s)},createMessageElement:function(){var s=this.parent(),e=s.getElement(".messages-message-text");new Element("span",{"class":"icon-spin icon-spinner fa fa-spinner fa-spin",styles:{marginRight:10}}).inject(e,"top");var t=new Element("span",{"class":"messages-message-percent",html:"0%",styles:{marginRight:10}});return t.inject(e,"top"),this.getAttribute("percent")===!1&&t.setStyle("display","none"),s},setStatus:function(s){var e,t,n;for(e=0,t=this.$elements.length;t>e;e++)n=this.$elements[e].getElement(".messages-message-percent"),n&&n.set("html",s.toInt()+"%")},finish:function(s,e){for(var t,n=0,i=this.$elements.length;i>n;n++){switch(t=this.$elements[n].getElement(".messages-message-text"),t.set("html",s),e){case"attention":case"error":case"information":case"success":this.$elements[n].addClass("message-"+e),this.setAttribute("cssclass","message-"+e),this.Type="qui/controls/messages/"+e.capitalize();break;default:this.$elements[n].addClass("message-success"),this.setAttribute("cssclass","message-success"),this.Type="qui/controls/messages/Success"}this.$elements[n].removeClass("message-loading")}this.setAttribute("message",s),this.fireEvent("finish",[this])}})});
//# sourceMappingURL=Loading.js.map