import { jsx as n, jsxs as d } from "react/jsx-runtime";
import s from "react";
import h from "./Avatar.js";
const b = (t) => {
  const { maxItemsVisible: i = 99, className: u = "", children: o, ...a } = t, e = s.Children.toArray(o);
  if (e.length <= i)
    return /* @__PURE__ */ n("div", { className: "AvatarGroup", children: e });
  const l = e.slice(0, i - 1), c = e.slice(i - 1), m = e.length - i + 1, p = c.map((r) => s.isValidElement(r) && "props" in r && "name" in r.props ? r.props.name : "").filter(Boolean);
  return /* @__PURE__ */ d("div", { className: "AvatarGroup", ...a, children: [
    l,
    /* @__PURE__ */ n(
      h,
      {
        abbr: `+${m}`,
        tooltip: /* @__PURE__ */ n("div", { children: p.map((r) => /* @__PURE__ */ n("div", { children: r }, r)) })
      }
    )
  ] });
};
export {
  b as default
};
//# sourceMappingURL=AvatarGroup.js.map
