"use strict";

function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireWildcard(require("react"));

var _classnames = _interopRequireDefault(require("classnames"));

var _communication = _interopRequireDefault(require("../../communication"));

var _upvote = _interopRequireDefault(require("../../upvote"));

var _upvoteListModal = _interopRequireDefault(require("../../upvote/upvoteListModal"));

var _constant = require("../constant");

var _dynamicAssessment = _interopRequireDefault(require("./dynamic-assessment"));

var _dynamicShare = _interopRequireDefault(require("./dynamic-share"));

var _dynamicChart = _interopRequireDefault(require("./dynamic-chart"));

var _dynamicAnnouncement = _interopRequireDefault(require("./dynamic-announcement"));

var _dynamicReply = _interopRequireDefault(require("./dynamic-reply"));

var _dynamicReport = _interopRequireDefault(require("./dynamic-report"));

var _dynamicRelative = _interopRequireDefault(require("./dynamic-relative"));

var _dynamicAlign = _interopRequireDefault(require("./dynamic-align"));

var _dynamicProgress = _interopRequireDefault(require("./dynamic-progress"));

var _dynamicCreateO = _interopRequireDefault(require("./dynamic-create-o"));

var _dynamicAiDialy = _interopRequireDefault(require("./dynamic-ai-dialy"));

var _dynamicTask = _interopRequireDefault(require("./dynamic-task"));

var _dynamicProject = _interopRequireDefault(require("./dynamic-project"));

var _dynamicKr = _interopRequireDefault(require("./dynamic-kr"));

var _dynamicReward = _interopRequireDefault(require("./dynamic-reward"));

var _dynamicMilestone = _interopRequireDefault(require("./dynamic-milestone"));

var _dynamicLearning = _interopRequireDefault(require("./dynamic-learning"));

var _bsGlobal = require("../../../utils/bs-global");

var _avatar = _interopRequireDefault(require("../../avatar"));

var _context = require("../context");

var _conditionRender = _interopRequireDefault(require("../../condition-render"));

var _auth = require("../../../utils/auth");

var _getLocale = require("../../../utils/getLocale");

var _tooltip = _interopRequireDefault(require("../../tooltip"));

var _feedOperate = _interopRequireDefault(require("./components/feed-operate"));

require("./index.css");

var _dynamicInterview = _interopRequireDefault(require("./dynamic-interview"));

var _dynamicInterviewShare = _interopRequireDefault(require("./dynamic-interview-share"));

var _dynamicNewReport = _interopRequireDefault(require("./dynamic-new-report"));

var _dynamicDiscovery = _interopRequireDefault(require("./dynamic-discovery"));

var _requestApi = require("../request-api");

var _excluded = ["data", "onDeleteFeed", "dynamicShareIsShowToping", "detailCurAtUser"];

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

var prefix = "titaui-dynamic-item";
var loginUserId = (0, _bsGlobal.getUserInfo)().Id;

var DynamicItem = function DynamicItem(_ref) {
  var _getBSGlobal, _JSON$parse;

  var data = _ref.data,
      onDeleteFeed = _ref.onDeleteFeed,
      dynamicShareIsShowToping = _ref.dynamicShareIsShowToping,
      detailCurAtUser = _ref.detailCurAtUser,
      restProps = _objectWithoutProperties(_ref, _excluded);

  var feedId = data.feedId,
      feedComments = data.feedComments,
      praiseType = data.praiseType,
      praiseUsers = data.praiseUsers,
      feedType = data.feedType,
      publishUser = data.publishUser,
      feedOperations = data.feedOperations;

  var _useState = (0, _react.useState)(feedComments.total > 0),
      _useState2 = _slicedToArray(_useState, 2),
      showComment = _useState2[0],
      setShowComment = _useState2[1];

  var _useState3 = (0, _react.useState)(true),
      _useState4 = _slicedToArray(_useState3, 2),
      usePropsComment = _useState4[0],
      setUsePropsComment = _useState4[1];

  var _useState5 = (0, _react.useState)(false),
      _useState6 = _slicedToArray(_useState5, 2),
      contentIsOverflow = _useState6[0],
      setContentIsOverflow = _useState6[1];

  var _useState7 = (0, _react.useState)(praiseUsers || []),
      _useState8 = _slicedToArray(_useState7, 2),
      praiseData = _useState8[0],
      setPraiseData = _useState8[1];

  var _useState9 = (0, _react.useState)(true),
      _useState10 = _slicedToArray(_useState9, 2),
      isFold = _useState10[0],
      setIsFold = _useState10[1];

  var _useState11 = (0, _react.useState)(false),
      _useState12 = _slicedToArray(_useState11, 2),
      upvoteModalVisible = _useState12[0],
      setUpvoteModalVisible = _useState12[1];

  var _useState13 = (0, _react.useState)(detailCurAtUser),
      _useState14 = _slicedToArray(_useState13, 2),
      curAtUser = _useState14[0],
      setCurAtUser = _useState14[1];

  var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
      searchKeyWord = _useContext.searchKeyWord,
      atAllText = _useContext.atAllText,
      atAllTipText = _useContext.atAllTipText,
      atAllValue = _useContext.atAllValue,
      isShowAtAll = _useContext.isShowAtAll;

  var hasDynamicOpereateAuth = new _auth.DynamicManagerAuth().hasAuth();
  var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)('WebHead')) !== null && _getBSGlobal !== void 0 && _getBSGlobal.AppHead.find(function (item) {
    return item.AppId === '950';
  }));
  var isBiShare = data.shareType === _constant.EShareType.BiShare && data.biId;

  var isFeedReport = isBiShare && _constant.PlanReportType.includes((_JSON$parse = JSON.parse(data.biId)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.type);

  var isDiscoveryFeed = data.feedType === _constant.EFeedType.Discovery;
  var dynamicContentRef = (0, _react.useRef)();
  var communicationRef = (0, _react.useRef)();

  var handleCommentClick = function handleCommentClick() {
    setShowComment(!showComment);
    setUsePropsComment(false);
  };

  var handleFold = function handleFold() {
    setIsFold(true);
  };

  var handleShowMore = function handleShowMore() {
    if (data.feedType === _constant.EFeedType.Report && window.titaTracker) {
      window.titaTracker("planAction").record({
        actionName: "查看日报",
        actionGroup: "动态-查看更多",
        productName: "动态",
        feedId: feedId
      });
    }

    if (data.feedType === _constant.EFeedType.Report && data.newSummary) {
      (0, _requestApi.setSummaryAlreadyRead)({
        feedId: feedId
      }).then(function (res) {
        if (res.Code === 1) {
          setCurAtUser(+loginUserId);
        }
      });
    }

    setIsFold(false);
  };

  var onChangeParse = function onChangeParse(type) {
    var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)("loginUserInfo"),
        Id = _getBSGlobal2.Id;

    var data = _toConsumableArray(praiseData).filter(function (item) {
      return Number("".concat(item.userId)) !== Number("".concat(Id));
    });

    var actionName = "";

    if (type) {
      var _getBSGlobal3, _getBSGlobal4;

      var avatar = (_getBSGlobal3 = (0, _bsGlobal.getBSGlobal)("loginUserInfo")) === null || _getBSGlobal3 === void 0 ? void 0 : _getBSGlobal3.UserAvatar;
      var name = (_getBSGlobal4 = (0, _bsGlobal.getBSGlobal)("loginUserInfo")) === null || _getBSGlobal4 === void 0 ? void 0 : _getBSGlobal4.Name;
      avatar.color = avatar.Color;
      avatar.medium = avatar.Medium;
      var parseUser = {
        avatar: avatar,
        name: name,
        userId: Id,
        praiseType: type
      };
      setPraiseData([parseUser].concat(_toConsumableArray(data)));
      actionName = "点赞日报";
    } else {
      setPraiseData(data);
      actionName = "取消日报点赞";
    }

    if (feedType === _constant.EFeedType.Report && window.titaTracker) {
      window.titaTracker("planAction").record({
        actionName: actionName,
        actionGroup: "动态-日报",
        productName: "动态",
        feedId: feedId
      });
    }
  };

  var renderContent = (0, _react.useMemo)(function () {
    switch (data.feedType) {
      case _constant.EFeedType.O:
        return /*#__PURE__*/_react["default"].createElement(_dynamicCreateO["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed
        });

      case _constant.EFeedType.Progress:
        return /*#__PURE__*/_react["default"].createElement(_dynamicProgress["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed
        });

      case _constant.EFeedType.Task:
        return /*#__PURE__*/_react["default"].createElement(_dynamicTask["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed
        });

      case _constant.EFeedType.Project:
        return /*#__PURE__*/_react["default"].createElement(_dynamicProject["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed
        });

      case _constant.EFeedType.Align:
        return /*#__PURE__*/_react["default"].createElement(_dynamicAlign["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed
        });

      case _constant.EFeedType.Relative:
        return /*#__PURE__*/_react["default"].createElement(_dynamicRelative["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed
        });

      case _constant.EFeedType.Kr:
        return /*#__PURE__*/_react["default"].createElement(_dynamicKr["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed
        });

      case _constant.EFeedType.Report:
        if (data.newSummary) {
          return /*#__PURE__*/_react["default"].createElement(_dynamicNewReport["default"], _extends({
            data: data,
            onDeleteFeed: onDeleteFeed,
            curAtUser: curAtUser,
            isFold: isFold
          }, restProps));
        }

        return /*#__PURE__*/_react["default"].createElement(_dynamicReport["default"], _extends({
          isFold: isFold,
          data: data,
          onDeleteFeed: onDeleteFeed
        }, restProps));

      case _constant.EFeedType.Reply:
        return /*#__PURE__*/_react["default"].createElement(_dynamicReply["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed
        });

      case _constant.EFeedType.Share:
        if (data.shareType === _constant.EShareType.CommonShare) {
          // 兼容一些 缺失shareType的 图表类型分享 过两天就会撤掉
          if (data.biId) {
            return /*#__PURE__*/_react["default"].createElement(_dynamicChart["default"], {
              data: data,
              onDeleteFeed: onDeleteFeed
            });
          }

          return /*#__PURE__*/_react["default"].createElement(_dynamicShare["default"], {
            data: data,
            onDeleteFeed: onDeleteFeed,
            hasDynamicOpereateAuth: hasDynamicOpereateAuth,
            dynamicShareIsShowToping: dynamicShareIsShowToping
          });
        }

        if (data.shareType === _constant.EShareType.BiShare) {
          return /*#__PURE__*/_react["default"].createElement(_dynamicChart["default"], {
            data: data,
            onDeleteFeed: onDeleteFeed
          });
        }

        if (data.shareType === _constant.EShareType.InterviewShare) {
          return /*#__PURE__*/_react["default"].createElement(_dynamicInterviewShare["default"], {
            data: data,
            onDeleteFeed: onDeleteFeed,
            hasDynamicOpereateAuth: hasDynamicOpereateAuth
          });
        }

        return /*#__PURE__*/_react["default"].createElement(_dynamicLearning["default"], {
          data: data
        });

      case _constant.EFeedType.Assessment:
        return /*#__PURE__*/_react["default"].createElement(_dynamicAssessment["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed
        });

      case _constant.EFeedType.Announcement:
        return /*#__PURE__*/_react["default"].createElement(_dynamicAnnouncement["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed,
          hasDynamicOpereateAuth: hasDynamicOpereateAuth
        });

      case _constant.EFeedType.Reward:
        return /*#__PURE__*/_react["default"].createElement(_dynamicReward["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed
        });

      case _constant.EFeedType.MileStone:
        return /*#__PURE__*/_react["default"].createElement(_dynamicMilestone["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed
        });

      case _constant.EFeedType.Interview:
        return /*#__PURE__*/_react["default"].createElement(_dynamicInterview["default"], {
          data: data,
          onDeleteFeed: onDeleteFeed
        });

      default:
        return null;
    }
  }, [data, curAtUser, isFold]);

  var renderUpvoteCount = function renderUpvoteCount(type, count) {
    if (count === 0) {
      return "";
    }

    return count || type;
  };

  var handlePayReward = function handlePayReward() {
    var data = {
      multi: false,
      toUserInfo: _objectSpread(_objectSpread({}, publishUser), {}, {
        id: publishUser.userId
      }),
      objId: feedId,
      objType: feedType
    };

    if (window.util) {
      if (feedType === _constant.EFeedType.Report && window.titaTracker) {
        window.titaTracker("planAction").record({
          actionName: "打开打赏弹层",
          actionGroup: "动态-日报",
          productName: "动态",
          feedId: feedId
        });
      }

      window.util.rewardGetFile(function (myReward) {
        myReward.renderPayReward(data);
      });
    }
  };

  var handleReply = function handleReply(_ref2) {
    var submitType = _ref2.submitType;
    if (feedType !== _constant.EFeedType.Report) return;
    var actionName = submitType === "delete" ? "删除日报评论" : "评论日报";

    if (window.titaTracker) {
      window.titaTracker("planAction").record({
        actionName: actionName,
        actionGroup: "动态-日报",
        productName: "动态",
        feedId: feedId
      });
    }
  };

  (0, _react.useEffect)(function () {
    setTimeout(function () {
      if (dynamicContentRef.current && dynamicContentRef.current.offsetHeight > 334) {
        setContentIsOverflow(true);
      }
    }, 0);
  }, [data]);
  (0, _react.useEffect)(function () {
    setShowComment(feedComments.total > 0);
  }, [feedComments]);
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: prefix
  }, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
    condition: isFeedReport
  }, /*#__PURE__*/_react["default"].createElement(_dynamicAiDialy["default"], {
    data: data
  })), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
    condition: isDiscoveryFeed
  }, /*#__PURE__*/_react["default"].createElement(_dynamicDiscovery["default"], {
    data: data
  })), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
    condition: !isFeedReport && !isDiscoveryFeed
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefix, "__content"),
    ref: dynamicContentRef,
    style: {
      height: contentIsOverflow && isFold ? "288px" : "auto"
    }
  }, renderContent, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
    condition: contentIsOverflow && isFold
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefix, "__content-show-more"),
    onClick: handleShowMore
  }, (0, _getLocale.getLocale)("Tasks_Tab_MyS_Butt_Seemoral"), /*#__PURE__*/_react["default"].createElement("i", {
    className: (0, _classnames["default"])("tu-icon-arrow-down", "".concat(prefix, "__icon"))
  })))), feedOperations.total > 0 && /*#__PURE__*/_react["default"].createElement(_feedOperate["default"], {
    feedOperations: feedOperations,
    data: data
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: (0, _classnames["default"])("".concat(prefix, "__footer"))
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefix, "__footer-left")
  }, praiseData.map(function (item, index) {
    if (index >= 8) return /*#__PURE__*/_react["default"].createElement("span", null);
    return /*#__PURE__*/_react["default"].createElement("div", {
      className: "".concat(prefix, "__footer-left-item"),
      key: item.userId
    }, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Icon, {
      name: item.name,
      userId: item.userId,
      avatar: item.avatar,
      type: item.praiseType,
      size: {
        width: 28,
        textNum: 1,
        fontSize: 12
      }
    }));
  }), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
    condition: praiseData && praiseData.length > 8
  }, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Num, {
    onClick: function onClick() {
      return setUpvoteModalVisible(true);
    },
    num: praiseData.length - 8
  }))), /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefix, "__footer-right")
  }, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
    condition: contentIsOverflow && !isFold
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefix, "__footer-fold"),
    onClick: handleFold
  }, (0, _getLocale.getLocale)("Mod_Fold"), /*#__PURE__*/_react["default"].createElement("i", {
    className: (0, _classnames["default"])("tu-icon-arrow-down", "".concat(prefix, "__icon"), "".concat(prefix, "__icon-up"))
  }))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
    condition: hasRewardBtn
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
    overlay: (0, _getLocale.getLocale)("Feed_Approval"),
    align: {
      offset: [0, 0]
    },
    placement: "top"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    onClick: handlePayReward,
    className: (0, _classnames["default"])("".concat(prefix, "__footer-icon"), "".concat(prefix, "__footer-icon-redenvelopes"))
  }))), /*#__PURE__*/_react["default"].createElement("span", {
    onClick: handleCommentClick,
    className: (0, _classnames["default"])("tu-icon-pinglun-m", "".concat(prefix, "__footer-icon"))
  }, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
    condition: feedComments.total > 0
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "".concat(prefix, "__footer-number")
  }, feedComments.total))), /*#__PURE__*/_react["default"].createElement(_upvote["default"], {
    type: praiseType,
    count: praiseUsers ? praiseUsers.length : 0,
    feedId: feedId,
    onChange: onChangeParse,
    style: {
      marginLeft: 30
    },
    buttonType: "tu-icon-tyle-column",
    customUpvoteBtnCls: "".concat(prefix, "__upvote-btn"),
    renderCount: renderUpvoteCount
  }), /*#__PURE__*/_react["default"].createElement(_upvoteListModal["default"], {
    feedId: feedId,
    visible: upvoteModalVisible,
    onClose: function onClose() {
      return setUpvoteModalVisible(false);
    }
  }))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
    condition: showComment
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: (0, _classnames["default"])("".concat(prefix, "__communication"))
  }, /*#__PURE__*/_react["default"].createElement(_communication["default"], {
    atAllText: atAllText,
    atAllTipText: atAllTipText,
    atAllValue: atAllValue,
    showAtAll: isShowAtAll,
    feedId: feedId,
    commentCount: 3,
    ref: communicationRef,
    highLightKeyWord: searchKeyWord,
    autoFocus: feedComments.total === 0,
    usePropsComment: usePropsComment,
    communication: feedComments.comments,
    totalCommunicationNum: feedComments.total,
    onReplyChange: handleReply,
    showUser: true,
    showDefaultInput: true
  })))));
};

var _default = DynamicItem;
exports["default"] = _default;