'use client' import type { FC } from 'react' import { memo } from 'react' import { Handle, Position } from 'reactflow' import { Plus02 } from '@/app/components/base/icons/src/vender/line/general' import type { CustomGroupNodeData } from './types' import { cn } from '@/utils/classnames' type CustomGroupNodeProps = { id: string data: CustomGroupNodeData } const CustomGroupNode: FC = ({ data }) => { const { group } = data const exitPorts = group.exitPorts ?? [] const connectedSourceHandleIds = data._connectedSourceHandleIds ?? [] return (
{/* Group Header */}
{group.title}
{/* Target handle for incoming connections */}
{exitPorts.map((port, index) => { const connected = connectedSourceHandleIds.includes(port.portNodeId) return (
{port.name}
{/* Visual "+" indicator (styling aligned with existing branch handles) */}
) })}
) } export default memo(CustomGroupNode)