import React from 'react';
import {
BaseEdge,
EdgeLabelRenderer,
getSmoothStepPath,
type EdgeProps,
} from '@xyflow/react';
import type { StartCombineOp } from '../../utils/strategyStartNodes';
export type StartCombineEdgeData = {
op?: StartCombineOp;
onToggle?: (op: StartCombineOp) => void;
};
/**
* START 노드끼리 잇는 결합 엣지 — 가운데 AND/OR 토글 배지.
* 클릭하면 startCombineOp 를 전환한다. (연결 자체는 START 2개 이상이면 자동 생성)
*/
export function StartCombineEdge({
id,
sourceX,
sourceY,
targetX,
targetY,
sourcePosition,
targetPosition,
data,
}: EdgeProps) {
const op: StartCombineOp = (data as StartCombineEdgeData | undefined)?.op === 'OR' ? 'OR' : 'AND';
const onToggle = (data as StartCombineEdgeData | undefined)?.onToggle;
const [edgePath, labelX, labelY] = getSmoothStepPath({
sourceX,
sourceY,
targetX,
targetY,
sourcePosition,
targetPosition,
borderRadius: 10,
});
return (
<>
>
);
}