import { __rest } from "tslib";
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import Widget from '../Widget';
import { styled } from '@mui/material/styles';
import Skeleton from '@mui/material/Skeleton';
import { CardContent, useTheme } from '@mui/material';
import BaseItem from '../../shared/BaseItem';
import { PREFIX } from './constants';
const classes = {
    root: `${PREFIX}-skeleton-root`,
    avatar: `${PREFIX}-avatar`,
    primaryContent: `${PREFIX}-primary-content`
};
const Root = styled(BaseItem, {
    name: PREFIX,
    slot: 'SkeletonRoot'
})(() => ({}));
/**
 * > API documentation for the Community-JS Comment Object Skeleton component. Learn about the available props and the CSS API.

 #### Import

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

 #### Component Name

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

 #### CSS

 |Rule Name|Global class|Description|
 |---|---|---|
 |root|.SCCommentObject-skeleton-root|Styles applied to the root element.|
 *
 */
export default function CommentObjectSkeleton(props) {
    const { WidgetProps } = props, rest = __rest(props, ["WidgetProps"]);
    const theme = useTheme();
    return (_jsx(Root, Object.assign({ className: classes.root, disableTypography: true }, rest, { image: _jsx(Skeleton, { animation: "wave", variant: "circular", width: theme.selfcommunity.user.avatar.sizeMedium, height: theme.selfcommunity.user.avatar.sizeMedium, className: classes.avatar }), secondary: _jsx(_Fragment, { children: _jsx(Widget, Object.assign({}, WidgetProps, { children: _jsxs(CardContent, { children: [_jsx(Skeleton, { animation: "wave", height: 10, width: "80%", className: classes.primaryContent }), _jsx(Skeleton, { animation: "wave", height: 10, width: "40%" })] }) })) }) })));
}
