+ {/* Common: Label */}
+
+
+ handleChange('label', e.target.value)}
+ className="w-full px-3 py-2 border rounded-lg"
+ />
+
+
+ {/* Type-specific fields */}
+ {data.type === 'model' && (
+ <>
+
+
+ handleChange('filePath', e.target.value)}
+ placeholder="path/to/model.prt"
+ className="w-full px-3 py-2 border rounded-lg font-mono text-sm"
+ />
+
+
+
+
+
+ >
+ )}
+
+ {data.type === 'solver' && (
+
+
+
+
+ )}
+
+ {data.type === 'designVar' && (
+ <>
+
+
+ handleChange('expressionName', e.target.value)}
+ placeholder="thickness"
+ className="w-full px-3 py-2 border rounded-lg font-mono"
+ />
+
+
+
+
+ handleChange('unit', e.target.value)}
+ placeholder="mm"
+ className="w-full px-3 py-2 border rounded-lg"
+ />
+
+ >
+ )}
+
+ {data.type === 'extractor' && (
+ <>
+
+
+
+
+ >
+ )}
+
+ {data.type === 'algorithm' && (
+ <>
+
+
+
+
+
+
+ handleChange('maxTrials', parseInt(e.target.value))}
+ placeholder="100"
+ className="w-full px-3 py-2 border rounded-lg"
+ />
+
+ >
+ )}
+
+ {data.type === 'objective' && (
+ <>
+
+
+ handleChange('name', e.target.value)}
+ placeholder="mass"
+ className="w-full px-3 py-2 border rounded-lg"
+ />
+
+
+
+
+
+
+
+ handleChange('weight', parseFloat(e.target.value))}
+ className="w-full px-3 py-2 border rounded-lg"
+ />
+
+ >
+ )}
+
+ {data.type === 'constraint' && (
+ <>
+
+
+ handleChange('name', e.target.value)}
+ placeholder="max_stress"
+ className="w-full px-3 py-2 border rounded-lg"
+ />
+
+
+
+
+
+
+
+
+ handleChange('value', parseFloat(e.target.value))}
+ className="w-full px-3 py-2 border rounded-lg"
+ />
+
+
+ >
+ )}
+
+ {data.type === 'surrogate' && (
+ <>
+
+ handleChange('enabled', e.target.checked)}
+ className="w-4 h-4"
+ />
+
+
+ {(data as SurrogateNodeData).enabled && (
+ <>
+
+
+
+
+
+
+ handleChange('minTrials', parseInt(e.target.value))}
+ className="w-full px-3 py-2 border rounded-lg"
+ />
+
+ >
+ )}
+ >
+ )}
+