package heroagent

import (
	"git.ourworld.tf/herocode/heroagent/pkg/servers/ui"
	"git.ourworld.tf/herocode/heroagent/pkg/servers/webdavserver"
)

// Config holds the configuration for the HeroAgent server factory
type Config struct {
	// Redis server configuration
	Redis RedisConfig

	// WebDAV server configuration
	WebDAV WebDAVConfig

	// UI server configuration
	UI UIConfig

	// Enable/disable specific servers
	EnableRedis  bool
	EnableWebDAV bool
	EnableUI     bool
}

// RedisConfig holds the configuration for the Redis server
type RedisConfig struct {
	TCPPort        int
	UnixSocketPath string
}

// WebDAVConfig holds the configuration for the WebDAV server
type WebDAVConfig struct {
	// Use webdavserver.Config directly
	Config webdavserver.Config
}

// UIConfig holds the configuration for the UI server
type UIConfig struct {
	// UI server configuration
	Port string
	// Any additional UI-specific configuration
	AppConfig ui.AppConfig
}

// DefaultConfig returns the default configuration for the HeroAgent
func DefaultConfig() Config {
	return Config{
		Redis: RedisConfig{
			TCPPort:        6378,
			UnixSocketPath: "/tmp/redis.sock",
		},
		WebDAV: WebDAVConfig{
			Config: webdavserver.DefaultConfig(),
		},
		UI: UIConfig{
			Port:      "9001", // Port is a string in UIConfig
			AppConfig: ui.AppConfig{},
		},
		EnableRedis:  true,
		EnableWebDAV: true,
		EnableUI:     true,
	}
}
