import React from 'react';
import likeHeart from "./like-heart.png";
import likeHideHeart from "./like-hide-heart.png";
import "./index.less";
import classNames from 'classnames';
var Like = function Like(_ref) {
  var status = _ref.status,
    onLike = _ref.onLike,
    className = _ref.className,
    style = _ref.style,
    isShowChangeResource = _ref.isShowChangeResource;
  var url = status === 'like' ? likeHeart : likeHideHeart;
  var handleClick = function handleClick(e) {
    if (!onLike) {
      return;
    }
    e.preventDefault();
    e.stopPropagation();
    onLike === null || onLike === void 0 || onLike(status === 'like' ? 'common' : 'like');
  };
  return /*#__PURE__*/React.createElement("div", {
    onClick: handleClick,
    className: "pisell-lowcode-product-card-like-wrap ".concat(isShowChangeResource ? 'pisell-lowcode-change-resource-like-wrap' : '')
  }, /*#__PURE__*/React.createElement("img", {
    style: style,
    src: url,
    className: classNames('like-icon', className)
  }));
};
export default Like;