import { jsx as t } from "react/jsx-runtime";
import c from "react";
import { a as f } from "./index.CfQlFjZU.js";
import { n as h } from "./index.B0wX8xO7.js";
import { c as d } from "./index.CfM2L_w0.js";
import { T as i } from "./TooltipEllipsis.CaTHJqXN.js";
import { E as m } from "./EllipsisText.DFxnPYIe.js";
const p = "creator_dataTableCell_x8oww", u = "creator_header_zh0q2", b = "creator_number_OI35c", s = { dataTableCell: p, header: u, number: b }, T = (e) => ({
  cellClassName: d(s.dataTableCell, {
    [s.header]: e.type === "header"
  }),
  ...e
}), _ = ({ cell: e, cellClassName: r, type: l }) => {
  const a = l === "header" ? "th" : "td";
  if (e == null)
    return /* @__PURE__ */ t(a, { className: r });
  if (typeof e == "string")
    return /* @__PURE__ */ t(a, { className: r, children: /* @__PURE__ */ t(i, { text: e, children: e }) });
  if (c.isValidElement(e))
    return /* @__PURE__ */ t(a, { className: r, children: /* @__PURE__ */ t(m, { children: e }) });
  if (typeof e == "object" && "element" in e && "props" in e) {
    const { element: n, props: o } = e;
    return /* @__PURE__ */ t(
      a,
      {
        ...o,
        className: d(r, {
          [o.className]: o.className !== void 0,
          [s.number]: !!o.isNumber
        }),
        children: /* @__PURE__ */ t(
          h,
          {
            value: typeof n == "string",
            then: /* @__PURE__ */ t(i, { text: n, children: n }),
            otherwise: /* @__PURE__ */ t(m, { children: n })
          }
        )
      }
    );
  }
  return /* @__PURE__ */ t(a, { className: r, children: String(e) });
}, C = f(_, T);
export {
  C as D
};
