import { jsxs as l, jsx as t } from "react/jsx-runtime";
import { Stack as n, Typography as p } from "@mui/material";
import f from "./tooltip-icon.js";
function u({
  icon: e = null,
  children: o = null,
  maxWidth: i = 100,
  title: a = void 0,
  sx: r = {}
}) {
  return (o === 0 || o) && /* @__PURE__ */ l(
    n,
    {
      direction: "row",
      sx: [
        {
          alignItems: "center",
          gap: 0.5
        },
        { maxWidth: i, overflow: "hidden" },
        ...Array.isArray(r) ? r : [r]
      ],
      children: [
        e,
        /* @__PURE__ */ t(f, { title: a || (typeof o == "string" ? o : ""), children: /* @__PURE__ */ t(
          p,
          {
            variant: "body2",
            sx: {
              flex: 1,
              overflow: "hidden",
              textOverflow: "ellipsis",
              whiteSpace: "nowrap",
              cursor: "default"
            },
            children: o
          }
        ) })
      ]
    }
  );
}
export {
  u as default
};
