import { Position, Handle } from 'reactflow';
import { getNodeSublabel } from './node.utils.jsx';
import { __ } from '@wordpress/i18n';

export default function TriggerNode({ id, data }) {
	return (
		<div class="waic-flow-node waic-trigger-node">
			<div class="waic-node-id">[{id}]</div>
			{!data.code && (
				<div className="waic-flow-add-icon">+</div>
			)}
			<div class="waic-node-label">{data.label ? data.label : __('Add trigger', 'ai-copilot-content-generator')}</div>
			<div class="waic-node-sublabel">{getNodeSublabel(data, 'triggers')}</div>
			<Handle type="source" position={Position.Right} id="output-right" />
		</div>
		
	);
}
