(function(){"use strict";u8.Base.Widgets.GridHeaderNavigator=function(e){$.extend(this,e);this._id=u8.Base.Dom.uniqueId();if(this.header){this.header.bind("Paging",this._onHeaderPaging.bind(this),this._id)}};$.extend(u8.Base.Widgets.GridHeaderNavigator.prototype,{dispose:function(){if(this._isDisposed){return}this._isDisposed=true;this.setHeader(null)},setHeader:function(e){if(this.header&&!this.header._isDisposed){this.header.unbind("*",this._id)}this.header=e;if(this.header){this.header.bind("Paging",this._onHeaderPaging.bind(this),this._id).bind("Dispose",this.setHeader.bind(this,null),this._id)}},setModel:function(e){this.model=e},update:function(e){if(!this.header){return}if(!e){var i=this.model;if(!i){return}var t=i.getPageSize();if(t<0){t=0}e={page:i.getPage(),pageSize:t,moreRowsExist:i.moreRowsExist?true:false,numberOfRows:null,totalNumberOfRows:null};var s,a=i.getTotalNumberOfRows();if(typeof a==="number"){s=e.totalNumberOfRows=a}else{e.numberOfRows=i.getRowCount();s=(e.moreRowsExist?">":"")+e.numberOfRows}this.header.parameters=$.extend(this.header.parameters,{NumberOfRows:s})}this.header.setPaging(e)},_onHeaderPaging:function(e,i){if(!this.model){return}var t=(i.command+"Page").toCamelCase();this.model.moveTo(t);var s=this.__owner;if(s){if(s.children&&s.children._items&&this.model&&this.model.globalActions){var a=this.model.globalActions.find(u8._.eq("name","allMiniDetails"));if(a){var d={};if(s.children._items.length>0&&this.model._pageSize===s.children._items.length){d={image:"u8-img-collapsed-s",tooltip:$t("TXT_net_ListIconLabels_10")};d.isExpanded=true}else{d={image:"u8-img-expanded-s",tooltip:$t("TXT_net_ListIconLabels_5")};d.isExpanded=false}this.model.updateAction(a,d)}}}}})})();