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