function f(n) {
  if (!n.isActive("image"))
    return null;
  const { state: l } = n, { from: i, to: c } = l.selection;
  let e = null;
  if (l.doc.nodesBetween(i, c, (a) => {
    if (a.type.name === "image")
      return e = a, !1;
  }), !e)
    return null;
  const t = e.attrs, s = t.src, r = t.alt, o = t.alignment, u = t.width ?? null, g = t.height ?? null;
  return s ? {
    src: s,
    alt: r ?? "",
    alignment: o ?? "left",
    width: u,
    height: g
  } : null;
}
export {
  f as default
};
//# sourceMappingURL=getSelectedImage.js.map
