"use strict";

exports.__esModule = true;
exports.default = AvatarGroupSkeleton;

var _react = _interopRequireDefault(require("react"));

var _styles = require("@mui/material/styles");

var _material = require("@mui/material");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

const PREFIX = 'SCAvatarGroupSkeleton';
const classes = {
  root: `${PREFIX}-root`
};
const Root = (0, _styles.styled)(_material.AvatarGroup, {
  name: PREFIX,
  slot: 'Root',
  overridesResolver: (props, styles) => styles.root
})(({
  theme
}) => ({
  justifyContent: 'flex-end',
  ['& .MuiAvatar-root']: {
    marginLeft: -6,
    backgroundColor: '#d5d5d5',
    border: 'none',
    color: '#FFF',
    fontSize: '0.85rem',
    width: 24,
    height: 24
  }
}));
/**
 * > API documentation for the Community-UI Avatar Group Skeleton component. Learn about the available props and the CSS API.

 #### Import

 ```jsx
 import {AvatarGroupSkeleton} from '@selfcommunity/ui';
 ```

 #### Component Name

 The name `SCAvatarGroupSkeleton` can be used when providing style overrides in the theme.

 #### CSS

 |Rule Name|Global class|Description|
 |---|---|---|
 |root|.SCAvatarGroupSkeleton-root|Styles applied to the root element.|
 *
 */

function AvatarGroupSkeleton(props) {
  return /*#__PURE__*/_react.default.createElement(Root, _extends({
    className: classes.root
  }, props), [...Array(props.max ? props.max + 1 : 5)].map((x, i) => /*#__PURE__*/_react.default.createElement(_material.Avatar, {
    key: i
  }, /*#__PURE__*/_react.default.createElement(_material.Skeleton, {
    variant: "circular",
    width: 24,
    height: 24
  }))));
}