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';
var SubscriberCountElement = function SubscriberCountElement(props) {
  var _context$subscriberCo;
  var context = useFlexibleUiContext();
  var data = context ? toBadgeProps((_context$subscriberCo = context.subscriberCount) === null || _context$subscriberCo === void 0 ? void 0 : _context$subscriberCo.toString()) : null;
  return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
    icon: IconType.Subscriber
  }, data, props, {
    name: ElementName.SubscriberCount
  })) : null;
};
export default SubscriberCountElement;