package com.ydl.webview

import android.app.Activity
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.router.YdlCommonRouterManager
import com.yidianling.router.RouterManager
import com.yidianling.router.user.IUserRouter
import com.yidianling.user.api.service.IUserService

/**
 * Created by haorui on 2019-10-10.
 * Des:
 */
class WebModularServiceUtils {

    companion object {
        fun getUserRouter(): IUserRouter {
            return RouterManager.getUserRouter()!!
        }

        fun getUserService(): IUserService {
            return ModularServiceManager.provide(IUserService::class.java)
        }

        fun getWebService(): IWebService {
            return ModularServiceManager.provide(IWebService::class.java)
        }

        fun  startMain(activity: Activity){
            YdlCommonRouterManager.getYdlCommonRoute().startMain(activity,false)
//            ARouter.getInstance().build("/main/main")
//                .withFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
//                .navigation()
        }
    }
}
