import { normalizeUri } from "../../../micromark-util-sanitize-uri/index.js";
function link(t, n) {
	let r = { href: normalizeUri(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);
}
export { link };
