import{s as f,v as c,w as v,E as P,G as m,f as l,aY as y,y as b,z as h,P as _,Q as g,D as N,a3 as C}from"./index-DT8qTvyx.js";var x=function(n){f(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.formatNumber=function(e,r){var a=void 0;return typeof e=="string"?(e=c(e)?v(e,this.props.data):e,a=typeof e=="string"?parseInt(e,10):e):typeof e=="number"&&(a=e),typeof a=="number"&&!isNaN(a)?a:r},t.prototype.onPageChange=function(e,r,a){return P(this,void 0,void 0,function(){var i,o,s,u,p;return m(this,function(d){switch(d.label){case 0:return i=this.props,o=i.onPageChange,s=i.dispatchEvent,u=i.data,[4,s==null?void 0:s("change",C(u,{page:e,perPage:r}))];case 1:return p=d.sent(),p!=null&&p.prevented?[2]:(o==null||o(e,r,a),[2])}})})},t.prototype.render=function(){var e=this.props,r=e.maxButtons,a=e.activePage,i=e.total,o=e.perPage;return l.createElement(y,b({},this.props,{onPageChange:this.onPageChange,maxButtons:this.formatNumber(r),activePage:this.formatNumber(a),total:this.formatNumber(i),perPage:this.formatNumber(o)}))},h([_,g("design:type",Function),g("design:paramtypes",[Number,Number,String]),g("design:returntype",Promise)],t.prototype,"onPageChange",null),t}(l.Component),R=function(n){f(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t=h([N({type:"pagination",alias:["pager"],name:"pagination"})],t),t}(x);export{R as PaginationRenderer,x as default};
