import { useLanguage } from '../../../providers/language/LanguageContext';
import styles from '../ContentPreview.module.css';

interface ErrorRendererProps {
  error: string;
  onRetry: () => void;
}

export function ErrorRenderer({ error, onRetry }: ErrorRendererProps) {
  const { t } = useLanguage();

  return (
    <div className={styles.errorContainer}>
      <div className={styles.errorIcon}>⚠️</div>
      <p>{error}</p>
      <button 
        onClick={onRetry} 
        className={styles.retryButton}
      >
        {t('Wiederholen')}
      </button>
    </div>
  );
}

