import { memo } from 'react';
import { NodeProps } from 'reactflow';
import { BaseNode } from './BaseNode';
import { ExtractorNodeData } from '../../../lib/canvas/schema';

function ExtractorNodeComponent(props: NodeProps<ExtractorNodeData>) {
  const { data } = props;
  return (
    <BaseNode {...props} icon={<span>🔬</span>} color="text-cyan-600">
      {data.extractorName && <div>{data.extractorName}</div>}
      {data.extractorId && (
        <div className="text-xs text-gray-400">{data.extractorId}</div>
      )}
    </BaseNode>
  );
}
export const ExtractorNode = memo(ExtractorNodeComponent);
