import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import { ElementName, IconType } from '../../../../../constants';
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
import { BaseBadgeElement, toBadgeProps } from '../common';
const VoteCountElement = props => {
  var _context$voteCount;
  const context = useFlexibleUiContext();
  const data = context ? toBadgeProps((_context$voteCount = context.voteCount) === null || _context$voteCount === void 0 ? void 0 : _context$voteCount.toString()) : null;
  return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
    icon: IconType.Vote
  }, data, props, {
    name: ElementName.VoteCount
  })) : null;
};
export default VoteCountElement;