import c from "validator/lib/isEmpty.js";
import p from "validator/lib/isNumeric.js";
import { z as s } from "zod";
import { CommonValidationErrorType as r, ThrownErrorType as N } from "./accelbyte-widgets341.mjs";
const m = s.enum([
  r.enum.empty,
  r.enum.lessThanMinimumValue,
  r.enum.exceedMaximumValue,
  r.enum.invalidValue,
  r.enum.containsDecimal
]), M = (e, {
  min: n = Number.MIN_SAFE_INTEGER,
  max: i = Number.MAX_SAFE_INTEGER,
  isRequired: u = !0,
  excludedNumbers: t = [],
  allowDecimal: o = !0
} = {}) => {
  const a = i < n, l = Number(e) % 1 !== 0;
  if (a)
    throw new Error(N.enum.invalidOption);
  return c(e) ? u ? m.enum.empty : null : !p(e) || Number(e) in t ? m.enum.invalidValue : Number(e) < n ? m.enum.lessThanMinimumValue : Number(e) > i ? m.enum.exceedMaximumValue : !o && l ? m.enum.containsDecimal : null;
};
export {
  m as ValidateNumericErrorType,
  M as validateNumeric
};
