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