'use client'

import { Handle, Position, type NodeProps } from '@xyflow/react'

export default function SourceNode({ data }: NodeProps) {
  return (
    <div className="flow-node border-flow-green/40">
      <Handle type="source" position={Position.Right} className="!bg-flow-green !w-3 !h-3" />
      <div className="text-center">
        <div className="text-flow-green text-lg mb-1">⊕</div>
        <div className="text-zen/70 text-xs font-mono">{(data as any).label || 'Source'}</div>
        {(data as any).flowRate !== undefined && (
          <div className="text-flow-green/50 text-[10px] mt-1">
            {(data as any).flowRate} units/s
          </div>
        )}
      </div>
    </div>
  )
}
