import React from "react";
import { NavigationItem, StyledIcon, Hostname, AlarmIndicator, } from "./styled";
const getAlarmsCount = (count) => (count > 9 ? "9+" : `${count}`);
export const NodeInfo = ({ criticalAlarmsCount, warningAlarmsCount, hostname, }) => (React.createElement(NavigationItem, null,
    React.createElement(StyledIcon, { name: "node" }),
    React.createElement(Hostname, null, hostname),
    criticalAlarmsCount > 0 && (React.createElement(AlarmIndicator, { alarmType: "critical" }, getAlarmsCount(criticalAlarmsCount))),
    warningAlarmsCount > 0 && (React.createElement(AlarmIndicator, { alarmType: "warning" }, getAlarmsCount(warningAlarmsCount)))));
//# sourceMappingURL=node-info.js.map