+ {/* Form Fields based on mode */}
+ {mode === 'template' ? (
+ /* Template Mode: Multilingual fields */
+
+ {/* Language Tabs */}
+
+ {LANGUAGES.map(lang => (
+
+ ))}
+
+
+ {/* Label Field */}
+
+
+
handleMultilingualChange(setLabelMulti, activeLanguageTab, e.target.value)}
+ placeholder={`Label (${activeLanguageTab.toUpperCase()})`}
+ />
+
Name der Vorlage
+
+
+ {/* Overview Field */}
+
+
+ ) : (
+ /* Definition Mode: Simple fields */
+
+ {/* Label Field */}
+
+
+ setLabel(e.target.value)}
+ placeholder="Name der Automatisierung"
+ />
+
+
+ {/* Schedule Field */}
+
+
+
setSchedule(e.target.value)}
+ placeholder="0 22 * * *"
+ />
+
+ Cron-Ausdruck für die Ausführungszeit (z.B. 0 22 * * * = täglich um 22:00)
+
+
+
+ {/* Active Checkbox */}
+
+
+
+ Automatisierung ist aktiv und wird planmässig ausgeführt
+
+
+
+ )}
+
+ {/* JSON Template Editor */}
+
+
+
+
+
+
+
+ Verwende {"{{KEY:name}}"} für Platzhalter
+
+
+
+
+ {/* Placeholders (only for definitions) */}
+ {mode === 'definition' && (
+
+
+
Platzhalter-Werte
+
+ {placeholderKeys.length} gefunden
+
+
+ {placeholderKeys.length > 0 ? (
+
+ {placeholderKeys.map(key => {
+ const typeInfo = placeholderTypeMap[key];
+ const frontendType = typeInfo?.frontendType;
+
+ return (
+
+
+ {key}
+ {typeInfo?.description && (
+
+ {typeInfo.description}
+
+ )}
+ {frontendType && (
+
+ {frontendType}
+
+ )}
+
+
+ {/* Render input based on frontendType - no fallback */}
+ {!typeInfo ? (
+
+
+ Kein Typ gefunden für "{key}" - Action-Definition fehlt oder Actions nicht geladen
+
+ ) : frontendType === 'userConnection' ? (
+
+ ) : frontendType === 'select' && typeInfo?.frontendOptions ? (
+
+ ) : frontendType === 'number' ? (
+
handlePlaceholderChange(key, e.target.value)}
+ placeholder={`Wert für ${key}...`}
+ />
+ ) : frontendType === 'checkbox' ? (
+
+ ) : frontendType === 'textarea' ? (
+
+ );
+ })}
+
+ ) : (
+
+ Keine Platzhalter im Template gefunden.
+ Verwende {"{{KEY:name}}"} im JSON.
+
+ )}
+
+ )}
+