import { jsx as o, Fragment as f } from "@emotion/react/jsx-runtime";
import c from "react";
import { getPropertyByString as g } from "@m4l/core";
import { ConcatenatedFormatter as d } from "../../../formatters/ConcatenatedFormatter/ConcatenatedFormatter.js";
function h(n) {
  const { fieldValue: a, fieldSeparator: i, Component: m = c.Fragment } = n;
  return (p) => {
    const { childRows: r } = p;
    if (r.length === 0)
      return /* @__PURE__ */ o(f, { children: "-" });
    const l = r[0], s = a.map((u) => {
      const t = g(l, u);
      let e;
      return typeof t == "string" || typeof t == "number" ? e = t.toString() : e = "", e;
    });
    return /* @__PURE__ */ o(
      d,
      {
        values: s,
        separator: i,
        Component: m
      }
    );
  };
}
export {
  h as ColumnConcatenatedValuesGroupFormatter
};
