import { computed as e } from "vue";
import { identity as t } from "@milaboratories/helpers";
function n(n, r) {
	let i = e(() => r.value.reduce((e, t) => (e[t.id] = t.justify ? "justify-" + t.justify : "", e), {}));
	return e(() => n.rows.map((e) => {
		let a = i.value, { primaryKey: o, offset: s, dataRow: c, height: l } = e, u = r.value.map((t) => ({
			id: t.id,
			column: t,
			row: e,
			value: c[t.id],
			class: a[t.id],
			editable: t.editable,
			width: t.width,
			style: t.style,
			control: t.control
		}));
		return t({
			style: {
				top: `${s - n.scrollTop}px`,
				height: `${e.height}px`
			},
			primaryKey: o,
			offset: s,
			height: l,
			cells: u,
			selected: n.selectedRows.has(o)
		});
	}));
}
export { n as useTableRows };

//# sourceMappingURL=useTableRows.js.map