"use strict";

exports.__esModule = true;
exports.default = NotificationSkeleton;

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

var _CardContent = _interopRequireDefault(require("@mui/material/CardContent"));

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

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

var _Skeleton = _interopRequireDefault(require("@mui/material/Skeleton"));

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 PREFIX = 'SCNotificationSkeleton';
const classes = {
  root: `${PREFIX}-root`
};
const Root = (0, _styles.styled)(_Widget.default)(({
  theme
}) => ({
  marginBottom: theme.spacing(2)
}));
/**
 * > API documentation for the Community-UI Notification Skeleton component. Learn about the available props and the CSS API.

 #### Import

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

 #### Component Name

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

 #### CSS

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

function NotificationSkeleton(props) {
  const notification = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.CardHeader, {
    avatar: /*#__PURE__*/_react.default.createElement(_Skeleton.default, {
      animation: "wave",
      variant: "circular",
      width: 40,
      height: 40
    }),
    title: /*#__PURE__*/_react.default.createElement(_Skeleton.default, {
      animation: "wave",
      height: 10,
      width: "80%",
      style: {
        marginBottom: 6
      }
    }),
    subheader: /*#__PURE__*/_react.default.createElement(_Skeleton.default, {
      animation: "wave",
      height: 10,
      width: "40%"
    })
  }));

  return /*#__PURE__*/_react.default.createElement(Root, _extends({
    className: classes.root
  }, props), /*#__PURE__*/_react.default.createElement(_CardContent.default, {
    sx: {
      paddingBottom: 1
    }
  }, /*#__PURE__*/_react.default.createElement(_Skeleton.default, {
    animation: "wave",
    height: 20,
    style: {
      marginBottom: 0
    }
  }), /*#__PURE__*/_react.default.createElement(_Skeleton.default, {
    animation: "wave",
    height: 15,
    width: "60%",
    style: {
      marginBottom: 0
    }
  })), [...Array(Math.floor(Math.random() * 5) + 1)].map((x, i) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
    key: i
  }, notification)));
}