import e from"@babel/runtime/helpers/defineProperty";import{jsxs as r,jsx as t}from"react/jsx-runtime";import{forwardRef as o,useMemo as i,createElement as n}from"react";import s from"classnames";import{Avatar as a}from"../Avatar/Avatar.js";import{getFontSize as c}from"../Avatar/constants.js";import{Tooltip as m}from"../Tooltip/Tooltip.js";import p from"./AvatarGroup.scss.js";function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function f(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var u=o((function(e,o){var l=e.testId,u=e.className,d=e.max,b=void 0===d?5:d,O=e.items,j=void 0===O?[]:O,v=e.size,y=void 0===v?40:v,h=e.disableTooltips,g=b<1?1:b,P=i((function(){return{"--size":"".concat(y,"px"),fontSize:"".concat(c(y),"px")}}),[y]);return r("div",{className:s(u,p.root),"data-testid":l,style:P,ref:o,children:[j.slice(0,g).map((function(e,r){var o=n(a,f(f({},e),{},{size:y,key:r,className:s(p.masked,e.className)}));return t(m,{title:e.name,disabled:h,children:o},r)})),j.length>g&&r("div",{className:s(p.masked,p.more),children:["+",j.length-g]})]})}));export{u as AvatarGroup};
//# sourceMappingURL=AvatarGroup.js.map
