"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const index = require("../micromark-util-sanitize-uri/index.cjs");
function link(state, node) {
  const properties = { href: index.normalizeUri(node.url) };
  if (node.title !== null && node.title !== void 0) {
    properties.title = node.title;
  }
  const result = {
    type: "element",
    tagName: "a",
    properties,
    children: state.all(node)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
exports.link = link;
//# sourceMappingURL=lib-handlers-link.cjs.map
