import { setResponseValueAndErrors as s, addErrorMessage as u } from "../errorMessages.js";
function l(a, m) {
  const i = {
    type: "number"
  };
  if (!a.checks)
    return i;
  for (const e of a.checks)
    switch (e.kind) {
      case "int":
        i.type = "integer", u(i, "type", e.message, m);
        break;
      case "min":
        m.target === "jsonSchema7" ? e.inclusive ? s(i, "minimum", e.value, e.message, m) : s(i, "exclusiveMinimum", e.value, e.message, m) : (e.inclusive || (i.exclusiveMinimum = !0), s(i, "minimum", e.value, e.message, m));
        break;
      case "max":
        m.target === "jsonSchema7" ? e.inclusive ? s(i, "maximum", e.value, e.message, m) : s(i, "exclusiveMaximum", e.value, e.message, m) : (e.inclusive || (i.exclusiveMaximum = !0), s(i, "maximum", e.value, e.message, m));
        break;
      case "multipleOf":
        s(i, "multipleOf", e.value, e.message, m);
        break;
    }
  return i;
}
export {
  l as parseNumberDef
};
//# sourceMappingURL=number.js.map
