import React, { memo } from 'react';
import ContentLoader, { Rect } from 'react-content-loader/native';
import { getSkeletonBackgrounColor } from '../../../core/utils/color';
const CommunityListSkeleton = ({
  hasTitle = true,
  themeStyle,
  amount = 4
}) => {
  const {
    backgroundColor,
    foregroundColor
  } = getSkeletonBackgrounColor(themeStyle);
  const titleHeight = hasTitle ? 36 : 0;
  const gap = 16;
  const marginTop = 23;
  const height = 80;
  const width = 80;
  return /*#__PURE__*/React.createElement(ContentLoader, {
    backgroundColor: backgroundColor,
    foregroundColor: foregroundColor
  }, hasTitle && /*#__PURE__*/React.createElement(Rect, {
    x: "0",
    y: "0",
    width: "156",
    height: "12",
    rx: "6",
    ry: "6"
  }), Array.from({
    length: amount
  }, (_, index) => {
    return /*#__PURE__*/React.createElement(React.Fragment, {
      key: index
    }, /*#__PURE__*/React.createElement(Rect, {
      key: index,
      x: "0",
      y: index * (height + gap) + titleHeight,
      width: width,
      height: height,
      rx: "8",
      ry: "8"
    }), /*#__PURE__*/React.createElement(Rect, {
      x: "100",
      y: index * (height + gap) + titleHeight + marginTop,
      width: "196",
      height: "12",
      rx: "6",
      ry: "6"
    }), /*#__PURE__*/React.createElement(Rect, {
      x: "100",
      y: index * (height + gap) + 24 + titleHeight + marginTop,
      width: "90",
      height: "10",
      rx: "6",
      ry: "6"
    }));
  }));
};
export default /*#__PURE__*/memo(CommunityListSkeleton);
//# sourceMappingURL=CommunityListSkeleton.js.map