import { t as missingDependenciesUrl } from "../index.js";
//#region node_modules/.pnpm/xsschema@0.4.4_zod-to-json-_1e4686a9f39595b58bfd877c5da5bf42/node_modules/xsschema/dist/zod-DjyNjMBF.js
var getToJsonSchemaFn = async () => {
	let zodV4toJSONSchema = (_schema) => {
		throw new Error(`xsschema: Missing zod v4 dependencies "zod". see ${missingDependenciesUrl}`);
	};
	let zodV3ToJSONSchema = (_schema) => {
		throw new Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${missingDependenciesUrl}`);
	};
	try {
		const { toJSONSchema } = await import("../index.js").then((n) => n.i);
		zodV4toJSONSchema = ((schema) => toJSONSchema(schema, { target: "draft-7" }));
	} catch (err) {
		if (err instanceof Error) console.error(err.message);
	}
	try {
		const { zodToJsonSchema } = await import("../index.js").then((n) => n.r);
		zodV3ToJSONSchema = zodToJsonSchema;
	} catch (err) {
		if (err instanceof Error) console.error(err.message);
	}
	return async (schema) => {
		if ("_zod" in schema) return zodV4toJSONSchema(schema);
		else return zodV3ToJSONSchema(schema);
	};
};
//#endregion
export { getToJsonSchemaFn };

//# sourceMappingURL=zod-DjyNjMBF-CqwIO3Y9.js.map