import { jsx as C } from "@emotion/react/jsx-runtime";
import { CheckboxCellAdapter as w } from "../../views/adapters/CheckboxCellAdapter/CheckboxCellAdapter.js";
function g(n) {
  const { field: f, disabledGetter: r, rowKeyGetter: t, useHook: d } = n;
  return (e) => {
    const { row: o } = e, [l, i] = d(f), s = (h, u) => {
      const a = new Set(l);
      h ? a.add(t(e.row)) : a.delete(t(e.row)), i(a), n.onAfterChange ? n.onAfterChange() : e.column.onAfterChange && e.column.onAfterChange();
    };
    let c = !1;
    return r && (c = r(o)), /* @__PURE__ */ C(
      w,
      {
        value: l.has(t(o)) || !1,
        disabled: c,
        tabIndex: e.tabIndex,
        onChange: s,
        "aria-label": "Select"
      },
      `${t(o)}-${l.has(t(o))}`
    );
  };
}
export {
  g as ColumnSetCheckFormatter
};
