import { jsx } from "react/jsx-runtime";
import { ElementStatusValues } from "../../types/execution.js";
const edgeTargetStatusToEdgeColor = {
    Cancelled: 'var(--canvas-error-icon)',
    Completed: 'var(--canvas-success-icon)',
    CRITICAL: 'var(--canvas-error-icon)',
    ERROR: 'var(--canvas-error-icon)',
    Failed: 'var(--canvas-error-icon)',
    INFO: 'var(--canvas-info-icon)',
    InProgress: 'var(--canvas-info-icon)',
    NotExecuted: 'var(--canvas-border)',
    Paused: 'var(--canvas-warning-icon)',
    Terminated: 'var(--canvas-error-icon)',
    Warning: 'var(--canvas-warning-icon)',
    UserCancelled: 'var(--canvas-info-icon)',
    WARNING: 'var(--canvas-warning-icon)',
    None: 'var(--canvas-border)'
};
const getStatusAnimation = (status, edgePath)=>{
    const shouldAnimate = status === ElementStatusValues.InProgress;
    if (!shouldAnimate) return null;
    return /*#__PURE__*/ jsx("circle", {
        r: "4",
        fill: edgeTargetStatusToEdgeColor[status],
        children: /*#__PURE__*/ jsx("animateMotion", {
            dur: "1s",
            repeatCount: "indefinite",
            path: edgePath
        })
    });
};
export { edgeTargetStatusToEdgeColor, getStatusAnimation };
