package crawler

import (
	"fmt"

	"github.com/maximotejeda/us_dop_scrapper/internal/ports"
)

func Selector(who string, client ports.DollarPort) (ports.APIPorts, error) {
	var parser ports.APIPorts
	switch who {
	case "apap":
		parser = NewApap()
	case "bcd":
		parser = NewBCD()
	case "brd":
		parser = NewBDR()
	case "bhd":
		parser = NewBHD()
	case "bnc":
		parser = NewBNC()
	case "bpd":
		parser = NewBPD()
	case "inf":
		parser = NewINF()
	case "scotia":
		parser = NewScotia()
	case "vimenca":
		parser = NewVimenca()
	default:
		return nil, fmt.Errorf("not recognize who: " + who)
	}
	return parser, nil
}
