import{j as t,b as e,q as o,S as c,ax as g,ay as h,R as d,B as s}from"./index-ktJf6c6X.js";import{P as m}from"./Pagination-1MFbB1nG.js";const x=[5,10,20,50],y=({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:x.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{y as M};
