package domaintest

import (
	"gitea.dwysokinski.me/twhelp/corev3/internal/domain"
	"github.com/brianvoe/gofakeit/v6"
	"github.com/stretchr/testify/require"
)

func NewServerConfig(tb TestingTB) domain.ServerConfig {
	tb.Helper()
	cfg, err := domain.NewServerConfig(
		gofakeit.Float64Range(1, 1000),
		gofakeit.Float64Range(1, 1000),
		gofakeit.IntRange(1, 20),
		domain.ServerConfigBuild{},
		domain.ServerConfigMisc{},
		domain.ServerConfigCommands{},
		domain.ServerConfigNewbie{},
		domain.ServerConfigGame{},
		domain.ServerConfigBuildings{},
		domain.ServerConfigSnob{},
		domain.ServerConfigAlly{Limit: gofakeit.IntRange(1, 20)},
		domain.ServerConfigCoord{},
		domain.ServerConfigSitter{},
		domain.ServerConfigSleep{},
		domain.ServerConfigNight{},
		domain.ServerConfigWin{Check: gofakeit.IntRange(1, 20)},
	)
	require.NoError(tb, err)
	return cfg
}
