import { jsx as k } from "react/jsx-runtime";
import { C as d } from "../../../../index-20bzTFSx.js";
import { useTableContext as C } from "../../context/index.js";
const m = ({ targetId: a, oneTarget: n, ...o }) => {
  const [t = {}, h] = C((c) => c.checkedData), { data: e } = { ...o }, s = () => {
    t[e[a]] ? h((c) => {
      delete c.checkedData[e[a]];
    }) : h((c) => {
      n ? c.checkedData = {
        [e[a]]: e
      } : c.checkedData = {
        ...c.checkedData,
        [e[a]]: e
      };
    });
  };
  return /* @__PURE__ */ k(
    d,
    {
      inputProps: {
        disabled: !0,
        checked: !!t[e[a]],
        onChange: s,
        ...o
      }
    }
  );
};
export {
  m as default
};
