import { __exports as o } from "../../../../../../../../_virtual/limitLength.js";
import { __require as h } from "../../compile/codegen/index.js";
import { __require as g } from "../../compile/util.js";
import { __require as p } from "../../runtime/ucs2length.js";
var s;
function y() {
  if (s) return o;
  s = 1, Object.defineProperty(o, "__esModule", { value: !0 });
  const e = h(), a = g(), i = p(), u = {
    keyword: ["maxLength", "minLength"],
    type: "string",
    schemaType: "number",
    $data: !0,
    error: {
      message({ keyword: r, schemaCode: n }) {
        const t = r === "maxLength" ? "more" : "fewer";
        return (0, e.str)`must NOT have ${t} than ${n} characters`;
      },
      params: ({ schemaCode: r }) => (0, e._)`{limit: ${r}}`
    },
    code(r) {
      const { keyword: n, data: t, schemaCode: m, it: c } = r, _ = n === "maxLength" ? e.operators.GT : e.operators.LT, d = c.opts.unicode === !1 ? (0, e._)`${t}.length` : (0, e._)`${(0, a.useFunc)(r.gen, i.default)}(${t})`;
      r.fail$data((0, e._)`${d} ${_} ${m}`);
    }
  };
  return o.default = u, o;
}
export {
  y as __require
};
//# sourceMappingURL=limitLength.js.map
