/** * ConfigPanel - Node configuration form */ 'use client'; import React from 'react'; import { Divider } from '../../fakemui'; import type { WorkflowNode, NodeType } from '../types'; import styles from '../../../scss/atoms/workflow-editor.module.scss'; interface ConfigPanelProps { node: WorkflowNode; nodeType: NodeType | undefined; onUpdateConfig: (nodeId: string, config: Record) => void; } export function ConfigPanel({ node, nodeType, onUpdateConfig }: ConfigPanelProps) { const configs = nodeType ? Object.entries(nodeType.defaultConfig) : []; return (
{configs.length > 0 ? ( configs.map(([key, defaultValue]) => (
{typeof defaultValue === 'boolean' ? ( ) : typeof defaultValue === 'string' && defaultValue.includes('\n') ? (