import t,{Component as e}from"react";import{Paginator as r}from"primereact/paginator";import{classNames as o,ObjectUtils as n}from"primereact/utils";import{Ripple as a}from"primereact/ripple";import{localeOption as i}from"primereact/api";function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);ra?1:0,e.props.sortOrder*i})),r}return null}},{key:"renderLoader",value:function(){if(this.props.loading){var e=o("p-dataview-loading-icon pi-spin",this.props.loadingIcon);return t.createElement("div",{className:"p-dataview-loading-overlay p-component-overlay"},t.createElement("i",{className:e}))}return null}},{key:"renderTopPaginator",value:function(){return!this.props.paginator||"bottom"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("top")}},{key:"renderBottomPaginator",value:function(){return!this.props.paginator||"top"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("bottom")}},{key:"renderEmptyMessage",value:function(){if(!this.props.loading){var e=this.props.emptyMessage||i("emptyMessage");return t.createElement("div",{className:"p-col-12 col-12 p-dataview-emptymessage"},e)}return null}},{key:"renderHeader",value:function(){return this.props.header?t.createElement("div",{className:"p-dataview-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?t.createElement("div",{className:"p-dataview-footer"}," ",this.props.footer):null}},{key:"renderItems",value:function(e){var r=this;if(e&&e.length){if(this.props.paginator){for(var o=this.props.onPage?this.props.rows:this.state.rows,n=this.props.lazy?0:this.props.onPage?this.props.first:this.state.first,a=this.getTotalRecords(),i=Math.min(o+n,a),s=[],p=n;p