import { jsonStringifyReplacer as o } from "../core/util.js";
import { $ZodError as a, flattenError as t, formatError as u } from "../core/errors.js";
import { $constructor as i } from "../core/core.js";
const m = (r, s) => {
  a.init(r, s), r.name = "ZodError", Object.defineProperties(r, {
    format: {
      value: (e) => u(r, e)
      // enumerable: false,
    },
    flatten: {
      value: (e) => t(r, e)
      // enumerable: false,
    },
    addIssue: {
      value: (e) => {
        r.issues.push(e), r.message = JSON.stringify(r.issues, o, 2);
      }
      // enumerable: false,
    },
    addIssues: {
      value: (e) => {
        r.issues.push(...e), r.message = JSON.stringify(r.issues, o, 2);
      }
      // enumerable: false,
    },
    isEmpty: {
      get() {
        return r.issues.length === 0;
      }
      // enumerable: false,
    }
  });
}, p = i("ZodError", m, {
  Parent: Error
});
export {
  p as ZodRealError
};
//# sourceMappingURL=errors.js.map
