(function(){"use strict";u8.Base.Widgets.NotificationView=function(i,e){this.Widget(i,$.extend({},u8.Base.Widgets.NotificationView.defaults,e));if(this.activeView){this._activeView=this.activeView;delete this.activeView}this._isCreated=false;this._create()};u8.Base.Widgets.NotificationView.makeClass({name:"NotificationView",deriveFrom:u8.Base.Widgets.Widget,events:["Create"]});u8.Base.Widgets.NotificationView.defaults={};$.extend(u8.Base.Widgets.NotificationView.prototype,{dispose:function(){if(this._isDisposed){return}this.Widget_dispose()},activate:function(i){if(this._isActive==i){return}this._isActive=i;if(i&&this._view){this._view.update({data:true})}if(this._isActive){u8.services.notification.markAsRead()}},setActiveView:function(i){var e=this.getActiveView();if(e==i){return}this._activeView=i;if(this._view){this._view.setActiveView(i)}},getActiveView:function(){if(this._view){return this._view.getActiveView()}return this._activeView},_create:function(){if(this._isDisposed){return}var i=this.$(this.element).empty();var e=i.html("<div class='u8-notificationview' />").children()[0];this._view=u8.widget("RelatedView",e,$.extend({headerName:"NotificationCenter",headerGroupName:"Special",value:null,parent:this,activeView:this.getActiveView(),allowItemRemove:false,hideIfEmpty:false,dashboardPanel:{showHeader:false},onPreCreate:function(i,e){var t=e.items;for(var s=0;s<t.length;s++){t[s].visibleFor="*"}}},this.view));u8.tools.created(this)},"Action.onPreExecute":function(i,e){e.elWindow=u8.application.getWorkWindow()}});u8.Base.WidgetBuilder.registerWidget("NotificationView",function(i,e,t){u8.widget("NotificationView",e,t)})})();