"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");

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)(_material.Card, {
  name: MESSAGE_PREFIX,
  slot: 'Root',
  overridesResolver: (props, styles) => styles.root
})(({
  theme
}) => ({
  marginBottom: theme.spacing(2)
}));

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",
      height: 10,
      width: "80%",
      style: {
        marginBottom: 6
      }
    })
  }), /*#__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,
    style: {
      marginBottom: 6
    }
  }))), /*#__PURE__*/_react.default.createElement(_material.Box, {
    className: messageClasses.media
  }, /*#__PURE__*/_react.default.createElement(_material.Skeleton, {
    sx: {
      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,
    style: {
      marginBottom: 6
    }
  }), /*#__PURE__*/_react.default.createElement(_material.Skeleton, {
    animation: "wave",
    height: 10,
    width: "80%"
  }))));
}

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
}) => ({}));

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));
}