package initialize

import (
	"github.com/twmb/franz-go/pkg/kgo"
	"go.uber.org/zap"
	"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/interface/broker/tariff"
)

type BrokersDeps struct {
	Logger       *zap.Logger
	TariffClient *kgo.Client
}

type Brokers struct {
	TariffConsumer *tariff.Consumer
	TariffProducer *tariff.Producer
}

func NewBrokers(deps BrokersDeps) *Brokers {
	return &Brokers{
		TariffConsumer: tariff.NewConsumer(tariff.ConsumerDeps{
			Logger: deps.Logger,
			Client: deps.TariffClient,
		}),
		TariffProducer: tariff.NewProducer(tariff.ProducerDeps{
			Logger: deps.Logger,
			Client: deps.TariffClient,
		}),
	}
}
