export default function StrikeReset({
  chapter,
  result,
  mistakes,
  onRestart
}) {
  return (
    <main className="strike-reset" aria-labelledby="strike-reset-title">
      <div className="strike-scan" aria-hidden="true" />

      <section className="strike-reset-card" aria-live="assertive">
        <div className="strike-orbit" aria-hidden="true">
          <span>!</span>
        </div>

        <p className="project-label">KAPITEL {chapter.number} // DREI FEHLER</p>
        <h1 id="strike-reset-title">
          Kernel Panic im Kapitel {chapter.number}
        </h1>
        <p className="strike-reset-summary">
          Drei falsche Entscheidungen in {chapter.topic}. Das Kapitel beginnt von
          vorn — gelöste Fragen und XP bleiben dir erhalten.
        </p>

        <div className="chapter-success-stats">
          <div>
            <span>Gelöst</span>
            <strong>
              {result.completed}/{result.total}
            </strong>
          </div>
          <div>
            <span>Offen</span>
            <strong>{result.total - result.completed}</strong>
          </div>
          <div>
            <span>Fehlversuche</span>
            <strong>{mistakes}</strong>
          </div>
        </div>

        <button type="button" onClick={onRestart}>
          Kapitel neu starten →
        </button>
      </section>
    </main>
  );
}
