import { jsx as o, Fragment as u } from "@emotion/react/jsx-runtime";
import { getPropertyByString as l } from "@m4l/core";
import s from "react";
import { DateFormatter as c } from "../../../formatters/DateFormatter/DateFormatter.js";
function F(n) {
  const { fieldValue: a, presentationType: i, Component: m = s.Fragment } = n;
  return (p) => {
    const { childRows: r } = p;
    if (r.length === 0)
      return /* @__PURE__ */ o(u, { children: "-" });
    const f = r[0], e = l(
      f,
      a
    );
    let t;
    return typeof e == "string" || typeof e == "number" || e instanceof Date ? t = e : t = "", /* @__PURE__ */ o(
      c,
      {
        presentationType: i,
        value: t,
        Component: m
      }
    );
  };
}
export {
  F as ColumnDateGroupFormatter
};
