{"version":3,"file":"LoadingErrorIndicator.mjs","names":[],"sources":["../../../../src/components/Loading/LoadingErrorIndicator.tsx"],"sourcesContent":["import React from 'react';\n\nimport { useTranslationContext } from '../../context/TranslationContext';\n\nexport type LoadingErrorIndicatorProps = {\n  error?: Error | null;\n};\n\n/** Renders the error message, or nothing when there is no error. */\nconst UnMemoizedLoadingErrorIndicator = ({ error }: LoadingErrorIndicatorProps) => {\n  const { t } = useTranslationContext();\n\n  if (!error) return null;\n\n  return (\n    <div>\n      {t('loading.errorIndicator.error.text', 'Error: {{ errorMessage }}', {\n        errorMessage: error.message,\n      })}\n    </div>\n  );\n};\n\nexport const LoadingErrorIndicator = React.memo(\n  UnMemoizedLoadingErrorIndicator,\n  (prevProps, nextProps) => prevProps.error?.message === nextProps.error?.message,\n) as typeof UnMemoizedLoadingErrorIndicator;\n"],"mappings":";;;;;AASA,IAAM,mCAAmC,EAAE,YAAwC;CACjF,MAAM,EAAE,MAAM,sBAAsB;CAEpC,IAAI,CAAC,OAAO,OAAO;CAEnB,OACE,oBAAC,OAAD,EAAA,UACG,EAAE,qCAAqC,6BAA6B,EACnE,cAAc,MAAM,QACtB,CAAC,EACE,CAAA;AAET;AAEA,IAAa,wBAAwB,MAAM,KACzC,kCACC,WAAW,cAAc,UAAU,OAAO,YAAY,UAAU,OAAO,OAC1E"}