'use client' /** * Create new Klausur form tab. * Supports both Abitur and Vorabitur modes with EH template selection. */ import type { TabId, CreateKlausurForm, VorabiturEHForm, EHTemplate } from './list-types' interface ErstellenTabProps { form: CreateKlausurForm ehForm: VorabiturEHForm templates: EHTemplate[] creating: boolean loadingTemplates: boolean onFormChange: (form: CreateKlausurForm) => void onEhFormChange: (form: VorabiturEHForm) => void onSubmit: (e: React.FormEvent) => void onCancel: () => void } export default function ErstellenTab({ form, ehForm, templates, creating, loadingTemplates, onFormChange, onEhFormChange, onSubmit, onCancel, }: ErstellenTabProps) { return (

Neue Klausur erstellen

{/* Title */}
onFormChange({ ...form, title: e.target.value })} placeholder="z.B. Deutsch LK Abitur 2025 - Kurs D1" className="w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent" required />
{/* Subject + Year */}
onFormChange({ ...form, year: parseInt(e.target.value) })} min={2020} max={2030} className="w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent" />
{/* Semester + Modus */}
{/* Vorabitur EH Form */} {form.modus === 'vorabitur' && (

Eigenen Erwartungshorizont erstellen

Waehlen Sie einen Aufgabentyp und beschreiben Sie die Aufgabenstellung. Der EH wird automatisch mit Ihrer Klausur verknuepft.

{/* Aufgabentyp */}
{loadingTemplates ? (
Lade Vorlagen...
) : ( )} {ehForm.aufgabentyp && templates.find(t => t.aufgabentyp === ehForm.aufgabentyp) && (

{templates.find(t => t.aufgabentyp === ehForm.aufgabentyp)?.description}

)}
{/* Text Details */}
onEhFormChange({ ...ehForm, text_titel: e.target.value })} placeholder="z.B. 'Die Verwandlung'" className="w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent" />
onEhFormChange({ ...ehForm, text_autor: e.target.value })} placeholder="z.B. 'Franz Kafka'" className="w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent" />
{/* Aufgabenstellung */}