import { snakeCase as o } from "es-toolkit";
import { i as n } from "../isDefined-DzVx0B6k.js";
function f(i, { shouldInclude: a = n } = {}) {
  const e = new URLSearchParams({});
  return Object.entries(i).forEach(([t, r]) => {
    if (a(r, t))
      if (Array.isArray(r))
        r.forEach((s) => {
          e.append(t, String(s));
        });
      else {
        if (typeof r == "object" && r !== null)
          throw new TypeError(
            `Invalid query string parameter value.

Received value: "${r}".

Values must be Primitive Values or arrays of Primitive Values. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#primitive_values`
          );
        e.append(o(t), String(r));
      }
  }), e.toString();
}
export {
  f as createQueryString,
  f as default
};
//# sourceMappingURL=createQueryString.js.map
