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