(function(){var a={}.hasOwnProperty,b=function(f,d){for(var c in d){if(a.call(d,c)){f[c]=d[c]}}function e(){this.constructor=f}e.prototype=d.prototype;f.prototype=new e();f.__super__=d.prototype;return f};window.Controls.main__page=(function(c){b(d,c);function d(){return d.__super__.constructor.apply(this,arguments)}d.prototype.createDom=function(){return'<div class="control container main-page"> \n    <div class="content-wr">\n        <div class="content">\n            <children>\n        </div>\n    </div>\n</div>'};return d})(window.Control);window.Controls.main__sections_tab=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){return'<a href="#" class="tab '+(this.s(this.properties.active?"active":""))+'">\n    <i class="loader pull-right hide-when-loaded icon icon-spinner icon-spin"></i>\n    <i class="icon-'+(this.s(this.properties.icon))+'"></i>&nbsp;'+(this.s(this.properties.title))+"\n</a>"};return c})(window.Control);window.Controls.main__sections_category=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){return'<div class="control container main-sections-category"> \n    <div>'+(this.s(this.properties.name))+'</div>\n    <div class="content">\n        <div class="--child-container">\n            <children>\n        </div>\n    </div>\n</div>'};return c})(window.Control);window.Controls.main__sections_root=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){this.requiresAllChildren=true;return'<div class="control container main-sections-root">\n    <div class="sidebar">\n        <div class="--tabs-container"></div>\n    </div>\n    <div class="main">\n        <div class="--child-container">\n            <children>\n        </div>\n        <div class="no-sections">\n            <div>\n                <div class="control label bold">No plugins are allowed for this user</div>\n            </div>\n            <div>\n                <div class="control label">\n                    Please ask your administrator to go to Configuration plugin and give you permissions to access some plugins.\n                </div>\n            </div>\n        </div>\n    </div>\n</div>'};c.prototype.setupDom=function(i){var j,h,f,g,e;c.__super__.setupDom.call(this,i);this.tabsContainer=$(this.dom).find(".--tabs-container");this.categories={};if(!this.properties.is_empty){$(this.dom).find(".no-sections").remove()}g=this.children;e=[];for(h=0,f=g.length;h<f;h++){j=g[h];e.push((function(k){return function(n){var l,m;if(!k.categories[n.properties.category]){l=new Controls.main__sections_category(k.ui,{name:n.properties.category});l.setupDom();k.categories[n.properties.category]=l;k.tabsContainer.append(l.dom)}m=new Controls.main__sections_tab(k.ui,$.extend(n.properties,{visible:true}));m.setupDom();$(m.dom).click(function(o){$(m.dom).find(".loader").show();Feedback.emit("Section activated",{Class:n.properties.clsname,Name:n.properties.title});k.event("switch",{uid:n.uid});return o.preventDefault()});if(!n.properties.hidden){return k.categories[n.properties.category].append(m)}}})(this)(j))}return e};return c})(window.Control);window.Controls.main__section=(function(c){b(d,c);function d(){return d.__super__.constructor.apply(this,arguments)}d.prototype.createDom=function(){return'<div class="control container section '+(this.properties.active?"active":"")+' normal">\n    <children>\n</div>'};return d})(window.Control);window.Controls.body=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){return'<div class="control container section-body">\n    <children>\n</div>'};return c})(window.Control)}).call(this);