import "react";
import "react/jsx-runtime";
import { memoize } from "../../../core/utils/memoize/memoize.mjs";
import "clsx";
import { getAllCheckedNodes } from "../get-all-checked-nodes/get-all-checked-nodes.mjs";
function isNodeChecked(value, data, checkedState) {
  if (checkedState.length === 0) {
    return false;
  }
  if (checkedState.includes(value)) {
    return true;
  }
  const checkedNodes = getAllCheckedNodes(data, checkedState).result;
  return checkedNodes.some((node) => node.value === value && node.checked);
}
const memoizedIsNodeChecked = memoize(isNodeChecked);
export {
  isNodeChecked,
  memoizedIsNodeChecked
};
