import { h } from '/static/admin2/vendor/preact.module.js'; import htm from '/static/admin2/vendor/htm.module.js'; const html = htm.bind(h); export const Table = ({ columns, rows, empty = 'Никого не нашлось', onRowClick }) => html`
${columns.map((c) => html``)}${rows.length ? rows.map((row) => html` onRowClick && onRowClick(row)}>${columns.map((c) => html` `)}`) : html``}
${c.label}
${c.render ? c.render(row) : row[c.key]}
${empty}
`;