"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const styles_1 = require("@mui/material/styles");
const material_1 = require("@mui/material");
const List_1 = tslib_1.__importDefault(require("@mui/material/List"));
const Skeleton_1 = tslib_1.__importDefault(require("../PrivateMessageThreadItem/Skeleton"));
const constants_1 = require("./constants");
const classes = {
    root: `${constants_1.PREFIX}-skeleton-root`,
    list: `${constants_1.PREFIX}-list`,
    editor: `${constants_1.PREFIX}-editor`
};
const Root = (0, styles_1.styled)(material_1.Card, {
    name: constants_1.PREFIX,
    slot: 'SkeletonRoot'
})(() => ({}));
/**
 * > API documentation for the Community-JS PrivateMessage Thread Skeleton component. Learn about the available props and the CSS API.

 #### Import

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

 #### Component Name

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

 #### CSS

 |Rule Name|Global class|Description|
 |---|---|---|
 |root|.SCPrivateMessageThread-skeleton-root|Styles applied to the root element.|
 |list|.SCPrivateMessageThread-list|Styles applied to the list element.|
 *
 */
function PrivateMessageThreadSkeleton(props) {
    const theme = (0, material_1.useTheme)();
    const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('sm'));
    return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsxs)(List_1.default, Object.assign({ className: classes.list }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListSubheader, Object.assign({ sx: { display: 'flex', justifyContent: 'center' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 30, width: 120, style: { borderRadius: 20 } }) })), [...Array(isMobile ? 6 : 8)].map((item, index) => ((0, jsx_runtime_1.jsx)(Skeleton_1.default, { index: index }, index)))] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.editor }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 55, width: '100%', variant: 'rectangular' }) }))] }) })));
}
exports.default = PrivateMessageThreadSkeleton;
