package client

import (
	"time"

	"github.com/tech/sendico/pkg/mlogger"
	"go.uber.org/zap"
)

// Config holds Aurora gateway client settings.
type Config struct {
	Address     string
	DialTimeout time.Duration
	CallTimeout time.Duration
	Logger      mlogger.Logger
}

func (c *Config) setDefaults() {
	if c.DialTimeout <= 0 {
		c.DialTimeout = 5 * time.Second
	}
	if c.CallTimeout <= 0 {
		c.CallTimeout = 10 * time.Second
	}
	if c.Logger == nil {
		c.Logger = zap.NewNop()
	}
}
