"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _native = _interopRequireWildcard(require("react-content-loader/native"));
var _color = require("../../../core/utils/color");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
const CommunityListSkeleton = ({
  hasTitle = true,
  themeStyle,
  amount = 4
}) => {
  const {
    backgroundColor,
    foregroundColor
  } = (0, _color.getSkeletonBackgrounColor)(themeStyle);
  const titleHeight = hasTitle ? 36 : 0;
  const gap = 16;
  const marginTop = 23;
  const height = 80;
  const width = 80;
  return /*#__PURE__*/_react.default.createElement(_native.default, {
    backgroundColor: backgroundColor,
    foregroundColor: foregroundColor
  }, hasTitle && /*#__PURE__*/_react.default.createElement(_native.Rect, {
    x: "0",
    y: "0",
    width: "156",
    height: "12",
    rx: "6",
    ry: "6"
  }), Array.from({
    length: amount
  }, (_, index) => {
    return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
      key: index
    }, /*#__PURE__*/_react.default.createElement(_native.Rect, {
      key: index,
      x: "0",
      y: index * (height + gap) + titleHeight,
      width: width,
      height: height,
      rx: "8",
      ry: "8"
    }), /*#__PURE__*/_react.default.createElement(_native.Rect, {
      x: "100",
      y: index * (height + gap) + titleHeight + marginTop,
      width: "196",
      height: "12",
      rx: "6",
      ry: "6"
    }), /*#__PURE__*/_react.default.createElement(_native.Rect, {
      x: "100",
      y: index * (height + gap) + 24 + titleHeight + marginTop,
      width: "90",
      height: "10",
      rx: "6",
      ry: "6"
    }));
  }));
};
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(CommunityListSkeleton);
//# sourceMappingURL=CommunityListSkeleton.js.map