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