-
- {/* Модалка «3 попытки» — показываем правильный ответ */}
- {answerState.kind === 'wrong' && answerState.showCorrect && answerState.correctAnswer && (
-
-
-
💪
-
- {t('lessonTryAgain')}
-
-
- {t('lessonShowCorrect')}
-
-
- {answerState.correctAnswer}
-
-
-
-
- )}
-
- {/* Заголовок */}
-
-
-
- {getLocalized(lesson.lesson, 'title')}
-
-
-
- {/* Счётчик задания */}
-
- {t('testQuestion')} {currentQuestionIndex + 1} / {questionsList.length}
- {retryMode && (
-
- 🔄 {t('lessonRetryMode')}
-
- )}
-
-
- {/* Объяснение + примеры — ТОЛЬКО на первом вопросе и НЕ в retry */}
- {showExplanation && (
-
-
- {getLocalized(lesson.lesson, 'explanation')}
-
- {lesson.examples.length > 0 && (
-
- {lesson.examples.map((example, i) => (
-
-
🇵🇱 {example.text_pl}
-
{getLocalized(example, 'text')}
-
- ))}
-
- )}
-
- )}
-
- {/* Блок вопроса — ref для scrollIntoView */}
-
-
- {getLocalized(currentQuestion.question, 'prompt')}
-
-
- {isProduction ? (
-
handleTextInputChange(currentQuestion.question.question_id, e.target.value)}
- onBlur={() => handleTextInputBlur(currentQuestion.question.question_id)}
- placeholder={t('teacherPlaceholder')}
- disabled={isAnswered || saving}
- style={{
- width: '100%', padding: '16px', borderRadius: radius.lg,
- border: textInputValue.trim() ? `2px solid ${brandColor}` : '1px solid rgba(255,255,255,0.7)',
- background: textInputValue.trim() ? `${brandColor}10` : cardBg,
- color: textColor, fontSize: '18px', fontWeight: 600,
- fontFamily: fonts.main, outline: 'none', textAlign: 'center',
- boxSizing: 'border-box',
- }}
- />
- ) : (
-
- {currentQuestion.options.map((option) => {
- const isSelected = selectedAnswers[currentQuestion.question.question_id] === option.option_key;
- const disabled = isAnswered || saving;
-
- return (
-
- );
- })}
-
- )}
-
-
- {/* Обратная связь */}
- {answerState.kind === 'correct' && (
-
-
- ✅ {t('lessonCorrect')}
-
-
- )}
-
- {answerState.kind === 'wrong' && !answerState.showCorrect && (
-
-
- 💪 {t('lessonNoWorry')}
-
-
- {t('lessonReadAgain')}
-
-
- )}
-
- {/* Кнопки навигации */}
-
- {currentQuestionIndex > 0 && (
-
- )}
-
- {answerState.kind === 'unanswered' && (
-
- )}
-
- {isAnswered && (
-
- )}
-
-