import { jsx as r, Fragment as m } from "@emotion/react/jsx-runtime";
import { getPropertyByString as c } from "@m4l/core";
import { ImageFormatter as d } from "../../../formatters/ImageFormatter/ImageFormatter.js";
const x = (s) => {
  const { fieldValue: l, fieldText: e, cover: a } = s;
  return (g) => {
    const { childRows: o } = g;
    if (o.length === 0)
      return /* @__PURE__ */ r(m, { children: "-" });
    const n = o[0], t = c(
      n,
      l.toString()
    ), i = e ? c(n, e.toString()) : void 0;
    return t ? /* @__PURE__ */ r(
      d,
      {
        src: t,
        alt: i || t,
        text: i ?? void 0,
        cover: a
      }
    ) : /* @__PURE__ */ r(m, { children: "-" });
  };
};
export {
  x as ColumnImageGroupFormatter
};
