"use strict";

exports.__esModule = true;
exports.default = SnippetNotificationSkeleton;

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

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

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

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

var _NotificationItem = _interopRequireDefault(require("../../shared/NotificationItem"));

var _notification = require("../../types/notification");

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 = 'SCSnippetNotificationSkeleton';
const classes = {
  root: `${PREFIX}-root`,
  item: `${PREFIX}-item`
};
const Root = (0, _styles.styled)(_material.List)(({
  theme
}) => ({
  marginBottom: theme.spacing(2),
  [`& .${classes.item}`]: {
    marginBottom: theme.spacing(),
    '&::before': {
      height: '11% !important'
    }
  }
}));
/**
 * > API documentation for the Community-UI Snippet Notification Skeleton component. Learn about the available props and the CSS API.

 #### Import

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

 #### Component Name

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

 #### CSS

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

function SnippetNotificationSkeleton(props) {
  const notificationSkeleton = /*#__PURE__*/_react.default.createElement(_NotificationItem.default, {
    className: classes.item,
    template: _notification.SCNotificationObjectTemplateType.SNIPPET,
    image: /*#__PURE__*/_react.default.createElement(_Skeleton.default, {
      animation: "wave",
      variant: "circular",
      width: 25,
      height: 25
    }),
    primary: /*#__PURE__*/_react.default.createElement(_Skeleton.default, {
      animation: "wave",
      height: 10,
      width: 120,
      style: {
        marginBottom: 10
      }
    }),
    secondary: /*#__PURE__*/_react.default.createElement(_Skeleton.default, {
      animation: "wave",
      height: 10,
      width: 70,
      style: {
        marginBottom: 10
      }
    })
  });

  return /*#__PURE__*/_react.default.createElement(Root, _extends({
    className: classes.root
  }, props), [...Array(7)].map((x, i) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
    key: i
  }, notificationSkeleton)));
}