import { normalizeUri as o } from "../../../../../micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri/index.js";
import { revert as p } from "../revert.js";
function m(e, t) {
  const l = String(t.identifier).toUpperCase(), i = e.definitionById.get(l);
  if (!i)
    return p(e, t);
  const r = { src: o(i.url || ""), alt: t.alt };
  i.title !== null && i.title !== void 0 && (r.title = i.title);
  const n = { type: "element", tagName: "img", properties: r, children: [] };
  return e.patch(t, n), e.applyData(t, n);
}
export {
  m as imageReference
};
//# sourceMappingURL=image-reference.js.map
