import React from 'react';
import PisellTag from "../../../../pisellTags";
var prefixCls = 'pisell-cart-sku-card__promotion';
var Promotion = function Promotion(props) {
  var promotions = props.promotions,
    _onClick = props.onClick;
  return /*#__PURE__*/React.createElement("div", {
    className: prefixCls
  }, promotions === null || promotions === void 0 ? void 0 : promotions.map(function (item, index) {
    if (!(item !== null && item !== void 0 && item.text)) return null;
    return /*#__PURE__*/React.createElement("div", {
      key: index,
      onClick: function onClick(e) {
        e.stopPropagation();
        _onClick === null || _onClick === void 0 || _onClick(item);
      }
    }, /*#__PURE__*/React.createElement(PisellTag, {
      type: "pill_color",
      color: "error",
      className: "".concat(prefixCls, "-tag-item")
    }, item === null || item === void 0 ? void 0 : item.text));
  }));
};
export default Promotion;