package knowledge

// ResolveScanPatrolKeywords picks keywords for placement-scan in UI/API order:
// explicit request > saved research map > auto-ranked from map + graph nodes.
func ResolveScanPatrolKeywords(explicit, saved []string, input PatrolTagInput, nodes []Node) []string {
	if keywords := NormalizePatrolKeywordList(explicit); len(keywords) > 0 {
		return keywords
	}
	if keywords := NormalizePatrolKeywordList(saved); len(keywords) > 0 {
		return keywords
	}
	return NormalizePatrolKeywordList(CollectPatrolTagsFromGraph(input, nodes))
}
