import React from "react";
import { Button } from "@netdata/netdata-ui";
import { IconContainer } from "../../styled";
const getAlarmIconName = (criticalAlarmsCount, warningAlarmsCount) => {
    if (criticalAlarmsCount > 0 && warningAlarmsCount > 0) {
        return "alarmCriticalWarning";
    }
    if (criticalAlarmsCount > 0) {
        return "alarmCritical";
    }
    if (warningAlarmsCount > 0) {
        return "alarmWarning";
    }
    return "alarm";
};
export const AlarmsControl = ({ criticalAlarmsCount, warningAlarmsCount, }) => (React.createElement(IconContainer, null,
    React.createElement(Button, { flavour: "borderless", neutral: true, themeType: "dark", className: "btn", "data-toggle": "modal", "data-target": "#alarmsModal", icon: getAlarmIconName(criticalAlarmsCount, warningAlarmsCount), title: "Alarms" })));
//# sourceMappingURL=alarms-control.js.map