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

 #### Import

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

 #### Component Name

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

 #### CSS

 |Rule Name|Global class|Description|
 |---|---|---|
 |root|.SCPrivateMessageThreadItem-skeleton-root|Styles applied to the root element.|
 |list|.SCPrivateMessageThreadItem-list|Styles applied to the list element.|
 *
 */
function PrivateMessageThreadItemSkeleton(props) {
    const theme = (0, material_1.useTheme)();
    const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
    return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsx)(ListItemText_1.default, { sx: { display: 'flex', justifyContent: props.index % 2 === 0 ? 'flex-start' : 'flex-end' }, primary: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", height: 100, width: isMobile ? 200 : 300, style: { borderRadius: theme.shape.borderRadius } }) }) })));
}
exports.default = PrivateMessageThreadItemSkeleton;
