import { jsx as u } from "react/jsx-runtime";
const h = ({ settings: l, meta: o }) => {
  var r, e, c, i, k;
  const a = (o == null ? void 0 : o.locale) || "en";
  if (!l.text) return null;
  const d = /^[\/#\?]|^[^:]+:/;
  let n = (r = l.link) == null ? void 0 : r.url;
  return d.test(((e = l.link) == null ? void 0 : e.url) ?? "") || (n = `https://${n}`), /* @__PURE__ */ u("div", { className: "link-block", children: /* @__PURE__ */ u(
    "a",
    {
      href: n || "#",
      target: (c = l.link) != null && c.newWindow ? "_blank" : void 0,
      rel: (i = l.link) != null && i.nofollow ? "nofollow" : void 0,
      className: "hover:underline",
      onClick: (f) => f.preventDefault(),
      children: (k = l.text) == null ? void 0 : k[a]
    }
  ) });
};
export {
  h as default
};
//# sourceMappingURL=link.block.js.map
