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 AttachmentCountElement = props => {
  var _context$attachmentCo;
  const context = useFlexibleUiContext();
  const data = context ? toBadgeProps((_context$attachmentCo = context.attachmentCount) === null || _context$attachmentCo === void 0 ? void 0 : _context$attachmentCo.toString()) : null;
  return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
    icon: IconType.Attachment
  }, data, props, {
    name: ElementName.AttachmentCount
  })) : null;
};
export default AttachmentCountElement;