import { j as t } from "../../../_virtual/jsx-runtime.js";
import { Checkbox as g } from "../../Field/checkbox/Checkbox.js";
import { CheckboxCell as j, Td as u } from "../styles.js";
import { getRowIdByIdentifier as b } from "../utils.js";
function A({
  filteredRows: o,
  onRowClick: d,
  selectedRows: r,
  disabledRows: i,
  columns: x,
  rowIdentifier: a,
  "data-testid": h,
  "data-trackid": m
}) {
  return /* @__PURE__ */ t.jsx("tbody", { "data-testid": h, "data-trackid": m, children: o.map((s, p) => {
    const l = b(s, a || ""), c = !!(a && r && r.includes(l)), n = !!(a && i && i.includes(l));
    return /* @__PURE__ */ t.jsxs(
      "tr",
      {
        "data-selected": c,
        "data-disabled": n,
        role: "row",
        children: [
          typeof d == "function" && /* @__PURE__ */ t.jsx(j, { as: "td", role: "cell", children: /* @__PURE__ */ t.jsx(
            g,
            {
              onChange: (e) => d(e.target.value),
              value: l,
              name: "select-row",
              checked: c,
              disabled: n
            }
          ) }),
          x.map(
            (e, f) => !e.hideCell && /* @__PURE__ */ t.jsx(
              u,
              {
                textAlign: e.textAlign,
                verticalAlign: e.verticalAlign,
                role: "cell",
                children: e.renderCell(s)
              },
              `cell_${f}`
            )
          )
        ]
      },
      `row_${p}`
    );
  }) });
}
export {
  A as default
};
