import{b as e,v as p,j as m,x as g,y as i,z as s,E as x,s as f,w as y,B as T}from"./index-BiWH3VAt.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};
