package engines

import (
	"net/http"
	"os"
	"time"
)

// NewDefaultPortedEngines returns the starter set of Go-native engines.
// The service can swap/extend this registry later as more engines are ported.
func NewDefaultPortedEngines(client *http.Client) map[string]Engine {
	if client == nil {
		client = &http.Client{Timeout: 10 * time.Second}
	}

	return map[string]Engine{
		"wikipedia": &WikipediaEngine{client: client},
		"arxiv":     &ArxivEngine{client: client},
		"crossref":  &CrossrefEngine{client: client},
		"braveapi": &BraveEngine{
			client:          client,
			apiKey:          os.Getenv("BRAVE_API_KEY"),
			accessGateToken: os.Getenv("BRAVE_ACCESS_TOKEN"),
			resultsPerPage: 20,
		},
		"qwant": &QwantEngine{
			client:         client,
			category:       "web-lite",
			resultsPerPage: 10,
		},
	}
}

