(l10nLabel);
    return acc;
  },
  {}
);

function getIconElement(level, type) {
  let title = l10n.getStr(l10nLevels[level] || level);
  const classnames = ["icon"];

  if (type && type === "logPoint") {
    title = l10n.getStr("logpoint.title");
    classnames.push("logpoint");
  }

  {
    return dom.span({
      className: classnames.join(" "),
      title,
      "aria-live": "off",
    });
  }
}

MessageIcon.displayName = "MessageIcon";
MessageIcon.propTypes = {
  level: PropTypes.string.isRequired,
  type: PropTypes.string,
};

function MessageIcon(props) {
  const { level, type } = props;

  if (type) {
    return getIconElement(level, type);
  }

  return CONSTANT_ICONS[level] || getIconElement(level);
}

module.exports = MessageIcon;
PK