package com.rosetta.messenger.network.connection

import android.content.Context

class NetworkConnectivityFacade(
    private val networkReconnectWatcher: NetworkReconnectWatcher,
    private val getAppContext: () -> Context?
) {
    fun hasActiveInternet(): Boolean {
        return networkReconnectWatcher.hasActiveInternet(getAppContext())
    }

    fun stopWaitingForNetwork(reason: String? = null) {
        networkReconnectWatcher.stop(getAppContext(), reason)
    }

    fun waitForNetworkAndReconnect(reason: String) {
        networkReconnectWatcher.waitForNetwork(getAppContext(), reason)
    }
}
