import { Handle, Position } from 'reactflow' /** * LogicNode - Bedingungs-Knoten (If-Then-Else) * * Properties: * - data.label: Node-Label * - data.condition: Logic Expression Object * - selected: Boolean */ export function LogicNode({ data, selected }) { const hasCondition = !!data.condition && !!data.condition.operator // Condition Summary (vereinfacht für Display) const getConditionSummary = () => { if (!hasCondition) return 'Keine Bedingung' const op = data.condition.operator?.toUpperCase() const operandCount = data.condition.operands?.length || 0 if (op === 'AND' || op === 'OR' || op === 'NOT') { return `${op} (${operandCount} Bedingungen)` } // Simple condition (ref, operator, value) if (data.condition.ref) { return `${data.condition.ref} ${data.condition.operator} ...` } return 'Bedingung definiert' } return (