export function getUnsupportedContent(
// Ignored via go/ees005
// eslint-disable-next-line @typescript-eslint/no-explicit-any
message, prefix, node, intl
// eslint-disable-next-line @typescript-eslint/no-explicit-any
) {
  const defaultLocale = 'en';
  let canTranslateToLocale = true;
  const locale = intl ? intl.locale : defaultLocale;
  let finalMessage = message.defaultMessage;
  if (node && locale.startsWith(defaultLocale)) {
    const {
      originalValue
    } = node.attrs;
    if (originalValue.text || originalValue.attrs && originalValue.attrs.text) {
      finalMessage = originalValue.text ? originalValue.text : originalValue.attrs.text;
      canTranslateToLocale = false;
    } else if (originalValue.type) {
      finalMessage = `${prefix} ${originalValue.type}`;
      canTranslateToLocale = false;
    }
  }
  if (intl && canTranslateToLocale) {
    return intl.formatMessage(message);
  }
  return finalMessage;
}