import { EDGE_COLORS } from "./constants.js";
function resolveEdgeColor(state) {
    const { selected, isHovered, isInvalid, isDiffAdded, isDiffRemoved, previewEdge, statusColor } = state;
    if (isDiffAdded) return EDGE_COLORS.diffAdded;
    if (isDiffRemoved) return EDGE_COLORS.diffRemoved;
    if (isInvalid) return EDGE_COLORS.invalid;
    if (previewEdge || selected) return EDGE_COLORS.selected;
    if (isHovered) return EDGE_COLORS.hover;
    if (statusColor) return statusColor;
    return EDGE_COLORS["default"];
}
export { resolveEdgeColor };
