"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _constants = require("../../../../../constants");
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
var _common = require("../common");
var HostNameElement = function HostNameElement(props) {
  var _context$data;
  var context = (0, _flexibleUiContext.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.default.createElement(_common.BaseTextElement, (0, _extends2.default)({
    content: hostName
  }, props, {
    name: _constants.ElementName.HostName
  })) : null;
};
var _default = exports.default = HostNameElement;