package copymission

import missiondomain "haixun-backend/internal/model/copy_mission/domain/usecase"

func ResearchSourcesFromSummaries(items []missiondomain.ResearchItemSummary) []ResearchSource {
	if len(items) == 0 {
		return nil
	}
	out := make([]ResearchSource, 0, len(items))
	for _, item := range items {
		out = append(out, ResearchSource{
			Title:   item.Title,
			URL:     item.URL,
			Snippet: item.Snippet,
			Query:   item.Query,
		})
	}
	return out
}