package especificos

import (
	"context"

	"gitlab.com/sistema-pro/xmlcolibex/internal/consulta"
)

type ImovelMap map[string]string

type FeaturesZapLoader interface {
	CarregarFeaturesZap(ctx context.Context, servicosJSON string) ([]string, error)
}

type Params struct {
	Feed        consulta.FeedConfig
	Im          consulta.ImovelRow
	M           ImovelMap
	NaventToken string
	ZapLoader   FeaturesZapLoader
}

func Aplicar(ctx context.Context, idPortal int, p Params) {
	switch idPortal {
	case 2, 48:
		aplicarZap(ctx, p)
	case 3, 5, 6, 7, 8, 9, 10, 11, 12, 18:
		aplicarImovelWeb(p)
	case 33:
		aplicarCasaMineira(p)
	case 47:
		aplicarImovelWebNovo(ctx, p)
	case 32:
		aplicarChaveNaMao(p)
	case 15:
		aplicarCRECI(p)
	case 45:
		aplicarFacebook(p)
	case 25:
		aplicarOLX(p)
	case 19, 27:
		aplicarAbcZL(p)
	}
}
