package config

// AppConfig contains application configuration
var AppConfig Config

// Load application configuration
func Load() {

	AppConfig = Config{

		Service: Service{
			Port: getEnv("OPENFIRE_PORT", "5222"),
		},
		Credentials: Credentials{
			CredentialsFileLocation: getEnv("CREDENTIALS_FILE_LOCATION", "input.json"),
		},
		GeneralOptions: GeneralOptions{
			PresenceStatusDelay:        int64(getEnvInt("PRESENCE_STATUS_DELAY", 2) * 60),
			CommandReplyDelay:          getEnvInt("COMMAND_REPLY_DELAY", 10),
			ExecuteSingleStatusMessage: getEnvBool("EXECUTE_SNIGLE_STATUS_MESSAGE"),
		},
	}
}
