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