'use client' import { CATEGORIES, EmailTemplate, STATUS_BADGE, TemplateVersion } from '../_types' interface EditorTabProps { template: EmailTemplate | null version: TemplateVersion | null subject: string html: string previewHtml: string | null saving: boolean onSubjectChange: (v: string) => void onHtmlChange: (v: string) => void onSave: () => void onPublish: () => void onPreview: () => void onBack: () => void } export function EditorTab({ template, version, subject, html, previewHtml, saving, onSubjectChange, onHtmlChange, onSave, onPublish, onPreview, onBack, }: EditorTabProps) { if (!template) { return (
Waehlen Sie ein Template aus der Liste.
) } const cat = CATEGORIES[template.category] || CATEGORIES.general return (

{template.name}

{cat.label} {version && ( {(STATUS_BADGE[version.status] || STATUS_BADGE.draft).label} )}
{version && version.status !== 'published' && ( )} {version && ( )}
{/* Variables */}
Variablen: {(template.variables || []).map(v => ( ))}
{/* Split View */}
{/* Editor */}
onSubjectChange(e.target.value)} className="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-purple-500 focus:border-transparent" placeholder="E-Mail Betreff..." />