package com.adealink.weparty.module.webview

import com.adealink.frame.aab.BaseDynamicModule

object WebModule : BaseDynamicModule<IWebService>(IWebService::class), IWebService {

    override val moduleNameResId: Int
        get() = 123123123
        //get() = R.string.module_webview

    override val featureName: String
        get() = "webview"

    override fun clearCache() {
        getService().clearCache()
    }

    override suspend fun getCacheSize(): Long {
        return getService().getCacheSize()
    }

    override fun emptyService(): IWebService {
        return object : IWebService {

            override fun clearCache() {

            }

            override suspend fun getCacheSize(): Long {
                return 0
            }

            override fun getService(): IWebService? {
                return null
            }

            override fun onLogout() {
            }

        }
    }

    override fun onLogout() {
        getService().onLogout()
    }

}