"use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _chunkVSCZBFV4js = require('./chunk-VSCZBFV4.js');

// tmp-babel/content-feed/web/PostReactionButton/index.js
var _buttons = require('@baseapp-frontend/design-system/components/web/buttons');
var _icons = require('@baseapp-frontend/design-system/components/web/icons');
var _material = require('@mui/material');
var _jsxruntime = require('react/jsx-runtime');
var PostReactionButton = function PostReactionButton2(_ref) {
  var targetRef = _ref.target;
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVSCZBFV4js.ReactionButton_default, {
    target: targetRef,
    reactionType: "LIKE",
    children: function children(_ref2) {
      var _target$myReaction, _target$reactionsCoun;
      var handleReaction = _ref2.handleReaction, target = _ref2.target;
      return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", {
        className: "grid grid-cols-[repeat(2,minmax(20px,max-content))] gap-1",
        children: [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _buttons.IconButton, {
          onClick: handleReaction,
          "aria-label": "react to comment ".concat(target.id),
          children: target !== null && target !== void 0 && (_target$myReaction = target.myReaction) !== null && _target$myReaction !== void 0 && _target$myReaction.id ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _icons.FavoriteSelectedIcon, {
            sx: {
              color: "error.main"
            }
          }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _icons.FavoriteIcon, {})
        }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, {
          variant: "caption",
          color: "text.secondary",
          "aria-label": "reactions count ".concat(target === null || target === void 0 ? void 0 : target.id),
          children: target === null || target === void 0 || (_target$reactionsCoun = target.reactionsCount) === null || _target$reactionsCoun === void 0 ? void 0 : _target$reactionsCoun.total
        })]
      });
    }
  });
};
var PostReactionButton_default = PostReactionButton;



exports.PostReactionButton_default = PostReactionButton_default;
//# sourceMappingURL=chunk-7QPIL3AL.js.map