import{j as t,b as e,q as o,S as c,au as g,av as h,R as d,B as s}from"./index-DlNZgIG9.js";import{P as m}from"./Pagination-Cd0gpqOA.js";const b=[5,10,20,50],S=({rowCount:i,paginationModel:a,onChange:n})=>{const l=Math.max(1,Math.ceil(i/a.pageSize));return t(s,{mt:1,px:1.5,py:1,sx:{borderTop:1,borderColor:"divider",bgcolor:"background.paper"},children:[e(c,{direction:"row",justifyContent:"space-between",alignItems:"center",mb:1,children:e(o,{variant:"caption",color:"text.secondary"})}),e(s,{display:"flex",flexDirection:"row",justifyContent:"center",children:t(c,{display:"flex",flexDirection:"row",gap:1,children:[e(g,{size:"small",sx:{minWidth:72},children:e(h,{value:a.pageSize,onChange:r=>n({page:0,pageSize:Number(r.target.value)}),children:b.map(r=>e(d,{value:r,children:r},r))})}),e(m,{page:a.page+1,count:l,size:"small",siblingCount:0,boundaryCount:1,shape:"rounded",color:"primary",onChange:(r,p)=>n({page:p-1,pageSize:a.pageSize})}),t(o,{variant:"caption",color:"text.secondary",children:["Showing"," ",e("b",{children:a.page*a.pageSize+1})," - ",e("b",{children:Math.min((a.page+1)*a.pageSize,i)})," ","of ",e("b",{children:i})]})]})})]})};export{S as M};
