import { normalizeUri as e } from "../../../micromark-util-sanitize-uri/index.js";
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/link.js
function t(t, n) {
	let r = { href: e(n.url) };
	n.title !== null && n.title !== void 0 && (r.title = n.title);
	let i = {
		type: "element",
		tagName: "a",
		properties: r,
		children: t.all(n)
	};
	return t.patch(n, i), t.applyData(n, i);
}
//#endregion
export { t as link };
