import React from "react";
import { StyledIcon, Container, RoomName, IndicatorsContainer, ErrorIndicator, WarningIndicator, UnreachableIndicator, } from "./styled";
export const RoomLabel = ({ room }) => {
    var _a, _b, _c;
    const alarmCounter = room.alarmCounter || {};
    const handleSelectRoom = () => {
        // navigate to cloud room
    };
    return (React.createElement(Container, { onClick: handleSelectRoom },
        React.createElement(StyledIcon, { name: "room" }),
        React.createElement(RoomName, null, room.name),
        React.createElement(IndicatorsContainer, null,
            ((_a = alarmCounter) === null || _a === void 0 ? void 0 : _a.critical) > 0 && (React.createElement(ErrorIndicator, null)),
            ((_b = alarmCounter) === null || _b === void 0 ? void 0 : _b.warning) > 0 && (React.createElement(WarningIndicator, null)),
            ((_c = alarmCounter) === null || _c === void 0 ? void 0 : _c.unreachable) > 0 && (React.createElement(UnreachableIndicator, null)))));
};
//# sourceMappingURL=room-label.js.map