import { Handle, Position } from 'reactflow'

/**
 * EndNode - Workflow Austritt
 *
 * Properties:
 * - data.label: Node-Label (default: "Ende")
 * - selected: Boolean (Node ist ausgewählt)
 */
export function EndNode({ data, selected }) {
  return (
    <div className={`workflow-node end-node ${selected ? 'selected' : ''}`}>
      <div className="node-icon">🏁</div>
      <div className="node-label">{data.label || 'Ende'}</div>

      {/* Nur Target Handle (kein Source, da Endpunkt) */}
      <Handle
        type="target"
        position={Position.Top}
        id="in"
        style={{ background: 'var(--danger)' }}
      />
    </div>
  )
}
