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