import{b as e,s as p,j as m,w as g,x as i,y as s,z as x,q as f,v as y,B as T}from"./index-DlNZgIG9.js";function C({columns:h,rows:t,keyFn:d,emptyMessage:o="No items",size:c="small",sx:b}){const l=h.filter(a=>a.show!==!1);return e(T,{sx:{overflowX:"auto",...b},children:e(p,{children:m(y,{size:c,children:[e(g,{children:e(i,{children:l.map(a=>e(s,{align:a.align??"left",width:a.width,sx:{fontWeight:700,whiteSpace:"nowrap",...a.headerSx},children:a.header},a.key))})}),e(x,{children:t.length===0?e(i,{children:e(s,{colSpan:l.length,align:"center",sx:{py:3},children:e(f,{variant:"body2",color:"text.secondary",children:o})})}):t.map((a,r)=>e(i,{sx:{"&:last-child td":{borderBottom:0}},children:l.map(n=>e(s,{align:n.align??"left",children:n.render(a,r)},n.key))},d?d(a,r):r))})]})})})}export{C};
