package client

import (
	"time"

	"go.uber.org/zap"
)

// Config holds Monetix gateway client settings.
type Config struct {
	Address     string
	DialTimeout time.Duration
	CallTimeout time.Duration
	Logger      *zap.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()
	}
}
