import React, { useState } from 'react'; const AdvancedSettings = ({ similarityTemperature, onTemperatureChange, difficultyWeight, onWeightChange }) => { const [isExpanded, setIsExpanded] = useState(false); const presets = [ { name: 'Default', temp: 0.2, weight: 0.5, description: 'Balanced settings (recommended)' }, { name: 'Focused', temp: 0.1, weight: 0.3, description: 'Deterministic, similarity-based' }, { name: 'Varied', temp: 0.7, weight: 0.5, description: 'More randomness and variety' }, { name: 'Challenging', temp: 0.5, weight: 0.7, description: 'Respects difficulty levels more' } ]; const applyPreset = (preset) => { onTemperatureChange(preset.temp); onWeightChange(preset.weight); }; const getTemperatureDescription = (value) => { if (value <= 0.3) return 'Deterministic (top similar words)'; if (value <= 0.6) return 'Balanced (good variety)'; if (value <= 1.0) return 'Random (surprising choices)'; return 'Very random (unpredictable)'; }; const getWeightDescription = (value) => { if (value <= 0.2) return 'Similarity-focused'; if (value <= 0.4) return 'Slightly similarity-focused'; if (value <= 0.6) return 'Balanced'; if (value <= 0.8) return 'Slightly frequency-focused'; return 'Frequency-focused'; }; return (