import { __rest } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import { styled } from '@mui/material/styles';
import { PREFIX } from './constants';
import { Box, Grid } from '@mui/material';
import classNames from 'classnames';
import { GroupSkeleton } from '../Group';
const classes = {
    root: `${PREFIX}-skeleton-root`,
    groups: `${PREFIX}-groups`
};
const Root = styled(Box, {
    name: PREFIX,
    slot: 'SkeletonRoot'
})(() => ({}));
/**
 * > API documentation for the Community-JS Groups Skeleton component. Learn about the available props and the CSS API.

 #### Import

 ```jsx
 import {GroupsSkeleton} from '@selfcommunity/react-ui';
 ```

 #### Component Name

 The name `SCGroups-skeleton-root` can be used when providing style overrides in the theme.

 #### CSS

 |Rule Name|Global class|Description|
 |---|---|---|
 |root|.SCGroups-skeleton-root|Styles applied to the root element.|
 |groups|.SCGroups-skeleton-groups|Styles applied to the group elements.|
 *
 */
export default function GroupsSkeleton(inProps) {
    const { className, GroupSkeletonProps = {}, groupsNumber = 20 } = inProps, rest = __rest(inProps, ["className", "GroupSkeletonProps", "groupsNumber"]);
    return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Grid, Object.assign({ container: true, spacing: { xs: 3 }, className: classes.groups }, { children: [...Array(groupsNumber)].map((category, index) => (_jsx(Grid, Object.assign({ item: true, xs: 12, sm: 8, md: 6 }, { children: _jsx(GroupSkeleton, Object.assign({ elevation: 0, variant: 'outlined' }, GroupSkeletonProps)) }), index))) })) })));
}
