function isContrastTrainingLesson(lessonType, lessonTitle = '') { const normalizedType = String(lessonType || '').toLowerCase(); if (normalizedType !== 'grammar') { return false; } const title = String(lessonTitle || '').toLowerCase(); return [ 'kontrast', 'fehlertraining', ' / ', 'nicht / kein', 'der / die / das', 'wo / wohin', 'du / sie', 'haben / sein', 'ich bin / ich habe', 'ich bin / ich heiße / ich komme' ].some((marker) => title.includes(marker)); } export function getGermanForBisayaLessonPedagogy(lessonNumber, lessonType, lessonTitle = '') { const phaseLabel = lessonNumber <= 60 ? 'quickstart' : lessonNumber <= 120 ? 'daily_life' : 'stabilization'; const blockNumber = Math.ceil(lessonNumber / 10); let didacticMode = 'core_input'; if (lessonType === 'conversation') didacticMode = 'guided_dialogue'; if (lessonType === 'grammar') didacticMode = 'pattern_drill'; if (isContrastTrainingLesson(lessonType, lessonTitle)) didacticMode = 'contrast_training'; if (lessonType === 'review') didacticMode = 'intensive_review'; if (lessonType === 'culture') didacticMode = 'real_life_scenario'; const difficultyWeight = didacticMode === 'contrast_training' ? 3 : lessonType === 'grammar' ? 3 : lessonType === 'review' ? 2 : lessonType === 'conversation' ? 2 : 1; const newUnitTarget = lessonType === 'review' ? 2 : didacticMode === 'contrast_training' ? 3 : lessonType === 'grammar' ? 4 : phaseLabel === 'quickstart' ? 6 : phaseLabel === 'daily_life' ? 5 : 4; const reviewWeight = lessonType === 'review' ? 90 : didacticMode === 'contrast_training' ? 70 : lessonType === 'grammar' ? 60 : lessonType === 'vocab' ? 55 : lessonType === 'culture' ? 20 : 35; return { phaseLabel, blockNumber, didacticMode, difficultyWeight, newUnitTarget, reviewWeight, isIntensiveReview: lessonType === 'review' }; }