import { tr } from '../lib/i18n'; import { useEffect, useState } from 'react'; import { Btn, Dialog, Icon } from './ui'; const stages = ['Checking hardware', 'Reviewing supported parameters', 'Choosing recommended settings', 'Ready to review']; /** Proposes catalog defaults; the animation never represents a measured benchmark. */ export function AutoTune({ open, onClose, onDone }: { open: boolean; onClose: () => void; onDone: () => void; }) { const [step, setStep] = useState(0); useEffect(() => { if (!open) return; setStep(0); const timer = setInterval(() => setStep(s => Math.min(3, s + 1)), 900); return () => clearInterval(timer); }, [open]); return {tr("Close")}{tr("Review recommended settings")}}>

{tr(stages[step])}

{tr("A recommendation based on detected hardware and supported defaults. Save to apply it; speed has not been benchmarked.")}

{tr(stages.map((s, i) => ))}
; }