import { statusMap } from "../config/status";

export default function NodeStatus({ status }) {
  const { color, labelCn } = statusMap[status] || { color: "gray", labelCn: "未知" };

  return (
    <span style={{ display: "flex", alignItems: "center" }}>
      <span
        style={{
          display: "inline-block",
          width: 10,
          height: 10,
          borderRadius: "50%",
          background: color,
          marginRight: 8,
        }}
      />
      {labelCn}
    </span>
  );
}
