"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkKNN7D6NNjs = require('./chunk-KNN7D6NN.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 p=function(e){var c=e.target;return _jsxruntime.jsx.call(void 0, _chunkKNN7D6NNjs.a,{target:c,reactionType:"LIKE",children:function(n){var a,i,l=n.handleReaction,d=n.isLoading,t=n.target;return _jsxruntime.jsxs.call(void 0, "div",{className:"grid grid-cols-[repeat(2,minmax(20px,max-content))] gap-1",children:[_jsxruntime.jsx.call(void 0, _buttons.IconButton,{onClick:l,isLoading:d,"aria-label":"react to comment ".concat(t.id),children:t!=null&&(a=t.myReaction)!==null&&a!==void 0&&a.id?_jsxruntime.jsx.call(void 0, _icons.FavoriteSelectedIcon,{sx:{color:"error.main"}}):_jsxruntime.jsx.call(void 0, _icons.FavoriteIcon,{})}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"caption",color:"text.secondary","aria-label":"reactions count ".concat(_optionalChain([t, 'optionalAccess', _ => _.id])),children:t==null||(i=t.reactionsCount)===null||i===void 0?void 0:i.total})]})}})},B= exports.a =p;exports.a = B;
//# sourceMappingURL=chunk-FA5TIYY2.js.map