import React from 'react';
import classNames from 'classnames';
import { Skeleton } from 'antd';
import { PREFIX } from "../index";
var ProductCardSkeleton = function ProductCardSkeleton(_ref) {
  var className = _ref.className,
    style = _ref.style,
    _ref$isProductCover = _ref.isProductCover,
    isProductCover = _ref$isProductCover === void 0 ? true : _ref$isProductCover,
    item = _ref.item;
  // 如果item.__typename为'category'，显示简单的输入框骨架屏
  if ((item === null || item === void 0 ? void 0 : item.__typename) === 'category') {
    return /*#__PURE__*/React.createElement(Skeleton.Input, {
      active: true,
      size: "small",
      block: false
    });
  }

  // 默认显示产品卡片骨架屏
  return /*#__PURE__*/React.createElement("div", {
    className: classNames("".concat(PREFIX, "__product-card"), className),
    style: style
  }, isProductCover && /*#__PURE__*/React.createElement(Skeleton.Image, {
    active: true,
    style: {
      width: 180,
      height: 126
    }
  }), /*#__PURE__*/React.createElement(Skeleton, {
    active: true,
    paragraph: {
      rows: 2
    }
  }));
};
export default ProductCardSkeleton;