import { jsx as m } from "react/jsx-runtime";
import { useTableContext as _ } from "../../context/index.js";
import { cn as d } from "../../../../utils/functions.js";
const D = ({ className: s, targetId: a, oneTarget: i, ...t }) => {
  const [o = {}, n] = _((c) => c.checkedData), { data: e } = { ...t }, h = () => {
    o[e[a]] ? n((c) => {
      delete c.checkedData[e[a]];
    }) : n((c) => {
      i ? c.checkedData = {
        [e[a]]: e
      } : c.checkedData = {
        ...c.checkedData,
        [e[a]]: e
      };
    });
  };
  return /* @__PURE__ */ m(
    "input",
    {
      ...t,
      checked: !!o[e[a]],
      onChange: h,
      className: d("cs3__form__radio__input _mx-auto _flex _justify-center _items-center _mt-0.5", s),
      type: "radio"
    }
  );
};
export {
  D as default
};
