import React from "react";
import { Text } from "@netdata/netdata-ui";
import Item from "../item";
import { useSelector } from "../../../store/redux-separate-context";
const hostNameSelector = state => {
    const snapshot = state.global.snapshot;
    const data = state.global.chartsMetadata.data;
    if (!snapshot && !data)
        return "";
    return snapshot ? snapshot.hostname : data.hostname;
};
const Node = () => {
    const hostname = useSelector(hostNameSelector);
    return (React.createElement(Item, { icon: "node_hollow" },
        React.createElement(Text, { color: "bright", strong: true, truncate: true }, hostname)));
};
export default Node;
//# sourceMappingURL=index.js.map