"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _styles = require("./styles");
var _reactNative = require("react-native");
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); }
function ImageFeedSkeleton({
  themeStyles
}) {
  const styles = (0, _styles.useStyles)();
  const {
    backgroundColor,
    foregroundColor
  } = (0, _color.getSkeletonBackgrounColor)(themeStyles);
  const screenWidth = _reactNative.Dimensions.get('window').width;
  const padding = 32;
  const gap = 8;
  const availableWidth = screenWidth - padding;
  const itemWidth = (availableWidth - gap) / 2;
  return /*#__PURE__*/React.createElement(_reactNative.View, {
    style: styles.container
  }, Array.from({
    length: 3
  }, (_, index) => /*#__PURE__*/React.createElement(_native.default, {
    speed: 1,
    key: index,
    width: availableWidth,
    height: itemWidth,
    backgroundColor: backgroundColor,
    foregroundColor: foregroundColor
  }, /*#__PURE__*/React.createElement(_native.Rect, {
    x: "0",
    y: "0",
    width: itemWidth,
    height: itemWidth,
    rx: "8"
  }), /*#__PURE__*/React.createElement(_native.Rect, {
    x: itemWidth + gap,
    y: "0",
    width: itemWidth,
    height: itemWidth,
    rx: "8"
  }))));
}
var _default = exports.default = ImageFeedSkeleton;
//# sourceMappingURL=ImageFeedSkeleton.js.map