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

var _chunkFFG7IVDOjs = require('./chunk-FFG7IVDO.js');

// tmp-babel/activity-log/web/ActivityLogComponent/LogItem/index.js
var _material = require('@mui/material');
var _jsxruntime = require('react/jsx-runtime');
var verbMapping = {
  "comments.add_comment": "Created a comment",
  "comments.change_comment": "Edited a comment",
  "comments.delete_comment": "Deleted a comment",
  "comments.reply_comment": "Replied to a comment",
  "comments.pin_comment": "Pinned a comment",
  "baseapp_reactions.add_reaction": "Added a reaction"
};
var LogItem = function LogItem2(_ref) {
  var _log$events$edges$0$n, _log$events;
  var log = _ref.log, sx = _ref.sx;
  var theme = _material.useTheme.call(void 0, );
  if (!(log !== null && log !== void 0 && log.verb)) return null;
  var getLogMessage = function getLogMessage2(verb, diff2) {
    var _verbMapping$verb;
    if (diff2) return _chunkFFG7IVDOjs.getUpdateMessage.call(void 0, verb, diff2);
    return (_verbMapping$verb = verbMapping[verb]) !== null && _verbMapping$verb !== void 0 ? _verbMapping$verb : verb;
  };
  var diff = (_log$events$edges$0$n = (_log$events = log.events) === null || _log$events === void 0 || (_log$events = _log$events.edges) === null || _log$events === void 0 || (_log$events = _log$events[0]) === null || _log$events === void 0 || (_log$events = _log$events.node) === null || _log$events === void 0 ? void 0 : _log$events.diff) !== null && _log$events$edges$0$n !== void 0 ? _log$events$edges$0$n : null;
  var displayText = getLogMessage(log.verb, diff);
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, {
    sx,
    display: "flex",
    alignItems: "center",
    borderLeft: "1px solid ".concat(theme.palette.text.disabled),
    marginLeft: "20px",
    children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, {
      ml: "30px",
      lineHeight: "22px",
      color: theme.palette.text.secondary,
      variant: "body2",
      children: displayText
    })
  });
};
var LogItem_default = LogItem;



exports.LogItem_default = LogItem_default;
//# sourceMappingURL=chunk-PH6JFRQ2.js.map