import { $constructor } from "../core/core.js";
import { $ZodError, flattenError, formatError } from "../core/errors.js";

//#region node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/errors.js
const initializer = (inst, issues) => {
	$ZodError.init(inst, issues);
	inst.name = "ZodError";
	Object.defineProperties(inst, {
		format: { value: (mapper) => formatError(inst, mapper) },
		flatten: { value: (mapper) => flattenError(inst, mapper) },
		addIssue: { value: (issue) => inst.issues.push(issue) },
		addIssues: { value: (issues$1) => inst.issues.push(...issues$1) },
		isEmpty: { get() {
			return inst.issues.length === 0;
		} }
	});
};
const ZodError = $constructor("ZodError", initializer);
const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });

//#endregion
export { ZodRealError };
//# sourceMappingURL=errors.js.map