import { Position as e, getSmoothStepPath as t } from "../../../node_modules/@xyflow/system/dist/esm/index.js";
//#region src/features/debug/lib/edge-paths.ts
var n = 75, r = 20, i = 130, a = 70;
function o(t, o, s) {
	if (s === e.Bottom || s === e.Top) {
		let e = t, i = o - a;
		return {
			path: `M ${t} ${o} C ${t + n} ${o + r}, ${e + n} ${i - r}, ${e} ${i}`,
			labelX: t + n + 8,
			labelY: (o + i) / 2
		};
	}
	let c = t - i, l = o;
	return {
		path: `M ${t} ${o} C ${t + r} ${o + n}, ${c - r} ${l + n}, ${c} ${l}`,
		labelX: (t + c) / 2,
		labelY: o + n + 8
	};
}
var s = 60;
function c(t, n, r, i, a) {
	if (a === e.Bottom) {
		let e = Math.abs(t - r), a = Math.max(e * .3, s);
		return {
			path: `M ${t} ${n} C ${t} ${n + a}, ${r} ${i + a}, ${r} ${i}`,
			labelX: (t + r) / 2,
			labelY: Math.max(n, i) + a + 10
		};
	}
	let o = Math.abs(n - i), c = Math.max(o * .3, s);
	return {
		path: `M ${t} ${n} C ${t + c} ${n}, ${r + c} ${i}, ${r} ${i}`,
		labelX: Math.max(t, r) + c + 10,
		labelY: (n + i) / 2
	};
}
function l(e) {
	let [n, r, i] = t(e);
	return {
		path: n,
		labelX: r,
		labelY: i
	};
}
function u(e, t) {
	return t.isSelfLoop ? o(e.sourceX, e.sourceY, e.sourcePosition) : t.isBackEdge ? c(e.sourceX, e.sourceY, e.targetX, e.targetY, e.sourcePosition) : l(e);
}
//#endregion
export { u as resolveEdgePath };
