import { jsx as f } from "@emotion/react/jsx-runtime";
import { getPropertyByString as n } from "@m4l/core";
import { ChipStatusFormatterColumnWrapperStyled as c } from "../../../formatters/ChipStatusFormatter/slots/ChipStatusFormatterSlots.js";
import { getNullGuard as a } from "../../../../utils/getNullGuard.js";
import { ChipStatusFormatter as g } from "../../../formatters/ChipStatusFormatter/ChipStatusFormatter.js";
const w = (e) => {
  const { fieldStatus: o, fieldLabel: t, statusesColors: l, fallbackColor: m } = e;
  return (r) => {
    const u = o.toString().startsWith("row.") ? o.toString().substring(4) : o.toString(), s = typeof t == "string" && t.startsWith("row.") ? t.substring(4) : t, i = a(n(r.row, u)), p = typeof s == "string" ? a(n(r.row, s)) : typeof t == "function" ? t(r.row, i) : "";
    return /* @__PURE__ */ f(
      g,
      {
        label: p,
        status: i,
        statusesColors: l,
        Component: c,
        fallbackColor: m
      }
    );
  };
};
export {
  w as ColumnChipStatusFormatter
};
