"use client";
import { jsxs as u, Fragment as g, jsx as o } from "react/jsx-runtime";
import w from "../../../assets/images/placeholder.png.js";
const b = ({ settings: l, meta: i }) => {
  var c, n, e, d, m, h, f, k;
  const p = (i == null ? void 0 : i.locale) || "en", a = (n = (c = l.caption) == null ? void 0 : c.text) == null ? void 0 : n[p], r = /* @__PURE__ */ u(g, { children: [
    /* @__PURE__ */ o(
      "img",
      {
        width: ((e = l.media) == null ? void 0 : e.originalWidth) ?? 500,
        height: ((d = l.media) == null ? void 0 : d.originalWidth) ?? 500,
        src: ((m = l.media) == null ? void 0 : m.url) ?? w,
        alt: ((h = l.media) == null ? void 0 : h.name) ?? "image"
      }
    ),
    a && /* @__PURE__ */ o("figcaption", { className: "block-img-caption", children: a })
  ] });
  return /* @__PURE__ */ o("figure", { className: "block-img", children: (f = l.link) != null && f.url ? /* @__PURE__ */ o(
    "a",
    {
      href: (k = l.link) == null ? void 0 : k.url,
      rel: l.link.nofollow ? "nofollow" : void 0,
      target: l.link.newWindow ? "_blank" : void 0,
      children: r
    }
  ) : r });
};
export {
  b as default
};
//# sourceMappingURL=image.block.js.map
