import { jsx as o } from "react/jsx-runtime";
import _ from "../../utils/classNames.js";
import g from "../tooltip/SimpleTooltip.js";
import I from "./AvatarContent.js";
const N = 100, O = 0, M = (s) => {
  const {
    name: t,
    abbr: i,
    image: r,
    alt: n,
    iconName: m = "user",
    size: p = 40,
    backgroundColor: l = "bg-lighter",
    tooltip: c,
    iconClassName: f,
    className: T = "",
    ...h
  } = s, d = _("Avatar", l, T), e = c || t;
  return ((a) => e ? /* @__PURE__ */ o(
    g,
    {
      content: e,
      placement: "bottom",
      delay: { show: N, hide: O },
      popperConfig: {
        modifiers: [
          {
            name: "offset",
            options: {
              offset: [0, 5]
            }
          },
          {
            name: "arrow",
            options: {}
          }
        ]
      },
      children: a
    }
  ) : a)(
    /* @__PURE__ */ o("div", { ...h, className: d, style: { height: `${p}px` }, children: /* @__PURE__ */ o(
      I,
      {
        name: t,
        abbr: i,
        image: r,
        alt: n,
        iconName: m,
        iconClassName: f
      }
    ) })
  );
};
export {
  M as default
};
//# sourceMappingURL=Avatar.js.map
