export function resolveIssueGoalId(input) {
    if (input.goalId !== undefined) {
        return input.goalId ?? null;
    }
    if (!input.projectId) {
        return input.defaultGoalId ?? null;
    }
    return null;
}
export function resolveNextIssueGoalId(input) {
    if (input.goalId !== undefined) {
        return input.goalId ?? null;
    }
    if (input.projectId === undefined) {
        return input.currentGoalId ?? null;
    }
    if (input.projectId === input.currentProjectId) {
        return input.currentGoalId ?? null;
    }
    const projectId = input.projectId !== undefined ? input.projectId : input.currentProjectId;
    const goalId = input.currentGoalId;
    if (!projectId && !goalId) {
        return input.defaultGoalId ?? null;
    }
    return goalId ?? null;
}
//# sourceMappingURL=issue-goal-fallback.js.map