"use strict";

exports.__esModule = true;
exports.MessageSkeleton = MessageSkeleton;
exports.default = BroadcastMessagesSkeleton;

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

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

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

var _Widget = _interopRequireDefault(require("../Widget"));

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 MESSAGE_PREFIX = 'SCBroadcastMessageSkeleton';
const messageClasses = {
  root: `${MESSAGE_PREFIX}-root`,
  header: `${MESSAGE_PREFIX}-header`,
  title: `${MESSAGE_PREFIX}-title`,
  media: `${MESSAGE_PREFIX}-media`,
  content: `${MESSAGE_PREFIX}-content`
};
const MessageRoot = (0, _styles.styled)(_Widget.default, {
  name: MESSAGE_PREFIX,
  slot: 'Root',
  overridesResolver: (props, styles) => styles.root
})(({
  theme
}) => ({
  marginBottom: theme.spacing(2)
}));
/**
 * > API documentation for the Community-UI Broadcast Message Skeleton component. Learn about the available props and the CSS API.

 #### Import

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

 #### Component Name

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

 #### CSS

 |Rule Name|Global class|Description|
 |---|---|---|
 |root|.SCBroadcastMessageSkeleton-root|Styles applied to the root element.|
 |header|.SCBroadcastMessageSkeleton-header|Styles applied to the header element.|
 |title|.SCBroadcastMessageSkeleton-title|Styles applied to the title element.|
 |media|.SCBroadcastMessageSkeleton-media|Styles applied to the media element.|
 |content|.SCBroadcastMessageSkeleton-content|Styles applied to the content section.|
 *
 */

function MessageSkeleton(props) {
  return /*#__PURE__*/_react.default.createElement(MessageRoot, {
    className: classes.root
  }, /*#__PURE__*/_react.default.createElement(_material.CardHeader, {
    className: messageClasses.header,
    avatar: /*#__PURE__*/_react.default.createElement(_material.Skeleton, {
      animation: "wave",
      variant: "circular",
      width: 40,
      height: 40
    }),
    title: /*#__PURE__*/_react.default.createElement(_material.Skeleton, {
      animation: "wave",
      variant: "rectangular",
      width: 60,
      height: 20
    })
  }), /*#__PURE__*/_react.default.createElement(_material.CardContent, {
    className: messageClasses.title
  }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.Skeleton, {
    animation: "wave",
    height: 10,
    width: "80%"
  }))), /*#__PURE__*/_react.default.createElement(_material.Box, {
    className: messageClasses.media
  }, /*#__PURE__*/_react.default.createElement(_material.Skeleton, {
    height: 190,
    animation: "wave",
    variant: "rectangular"
  })), /*#__PURE__*/_react.default.createElement(_material.CardContent, {
    className: messageClasses.content
  }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.Skeleton, {
    animation: "wave",
    height: 10,
    width: "80%"
  }), /*#__PURE__*/_react.default.createElement(_material.Skeleton, {
    animation: "wave",
    height: 10,
    width: 60
  }))));
}

const PREFIX = 'SCBroadcastMessagesSkeleton';
const classes = {
  root: `${PREFIX}-root`
};
const Root = (0, _styles.styled)(_material.Box, {
  name: PREFIX,
  slot: 'Root',
  overridesResolver: (props, styles) => styles.root
})(({
  theme
}) => ({}));
/**
 * > API documentation for the Community-UI Broadcast Messages Skeleton component. Learn about the available props and the CSS API.

 #### Import

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

 #### Component Name

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

 #### CSS

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

function BroadcastMessagesSkeleton(props) {
  return /*#__PURE__*/_react.default.createElement(Root, _extends({
    className: classes.root
  }, props), /*#__PURE__*/_react.default.createElement(MessageSkeleton, null), /*#__PURE__*/_react.default.createElement(MessageSkeleton, null), /*#__PURE__*/_react.default.createElement(MessageSkeleton, null));
}