function evaluateVisibilityRule(rule, formData) {
  const current = formData[rule.field];
  switch (rule.operator) {
    case "eq":
      return current === rule.value;
    case "neq":
      return current !== rule.value;
    case "in":
      return Array.isArray(rule.value) ? rule.value.includes(current) : false;
    case "notIn":
      return Array.isArray(rule.value) ? !rule.value.includes(current) : true;
    case "truthy":
      return Boolean(current);
    case "falsy":
      return !current;
    default:
      return true;
  }
}
function evaluateInjectedVisibility(condition, values, context) {
  if (!condition) return true;
  if (typeof condition === "function") return condition(values, context);
  return evaluateVisibilityRule(condition, values);
}
export {
  evaluateInjectedVisibility,
  evaluateVisibilityRule
};
//# sourceMappingURL=visibility-utils.js.map
