import { jsx as o, jsxs as n } from "react/jsx-runtime";
import "react";
import { Popup as a } from "semantic-ui-react";
import { connect as c } from "react-redux";
const d = (e) => {
  let r;
  try {
    r = decodeURIComponent(e);
  } catch {
    r = e, console.error("error occurred decoding content:" + e);
  }
  return r;
}, s = ({
  "data-index": e = "",
  "data-description": r = "",
  "data-link": t = ""
}) => /* @__PURE__ */ o(
  a,
  {
    className: "reference-popup",
    hoverable: !0,
    size: "mini",
    offset: [-16, 0],
    content: /* @__PURE__ */ n("div", { children: [
      /* @__PURE__ */ o("p", { children: d(r) }),
      /* @__PURE__ */ o("a", { href: t, target: "_blank", children: t })
    ] }),
    trigger: /* @__PURE__ */ o("a", { "data-index": e, "data-description": r, "data-link": t, href: `#ref_${e}`, className: "wp-reference", children: e })
  }
), p = (e, r) => ({ random: e.getIn(["embeddable", "random"]) }), i = {}, h = c(p, i)(s);
export {
  h as default
};
