package mx.trackermap.TrackerMap.client.infrastructure import com.russhwolf.settings.Settings import com.russhwolf.settings.get import com.russhwolf.settings.set import mx.trackermap.TrackerMap.client.apis.ACCESS_TOKEN_KEY import mx.trackermap.TrackerMap.client.apis.SERVER_URL_KEY class SessionManager( private val defaultBaseUrl: String ) { private val settings = Settings() var baseUrl: String get() = settings[SERVER_URL_KEY] ?: defaultBaseUrl set(baseUrl) { settings[SERVER_URL_KEY] = baseUrl } var token: String get() = settings[ACCESS_TOKEN_KEY] ?: "" set(token) { settings[ACCESS_TOKEN_KEY] = token } }