package initialize

import (
	"gitea.pena/PenaSide/customer/pkg/customer_clients"
	"gitea.pena/SQuiz/common/clients"
	"go.uber.org/zap"
)

type Clients struct {
	MailClient     *clients.SmtpClient
	CustomerClient *customer_clients.CustomersClient
}

func NewClients(cfg Config, logger *zap.Logger) *Clients {
	return &Clients{
		MailClient: clients.NewSmtpClient(clients.Deps{
			SmtpSender: cfg.Sender,
			ApiKey:     cfg.ApiKey,
			SmtpApiUrl: cfg.ApiUrl,
		}),
		CustomerClient: customer_clients.NewCustomersClient(customer_clients.CustomersClientDeps{
			Logger:              logger,
			CustomerServiceHost: cfg.CustomerMicroserviceRPCURL,
		}),
	}
}
