package com.gamedog.vididin.router

import android.content.Context
import com.gamedog.vididin.core.router.interfaces.HomeRouter
import com.gamedog.vididin.core.router.interfaces.LoginRouter
import com.gamedog.vididin.core.router.interfaces.MineRouter
import com.gamedog.vididin.core.router.interfaces.TaskRouter
import com.gamedog.vididin.di.RouterEntryPoint
import com.gamedog.vididin.features.benefit.BenefitRouter
import com.gamedog.vididin.features.winrecords.WinRecordRouter
import com.gamedog.vididin.features.withdraw.WithdrawRouter
import com.gamedog.vididin.features.withdraw.WithdrawSubRouter
import com.gamedog.vididin.features.zero.ZeroBuyRouter
import dagger.hilt.android.EntryPointAccessors
import kotlin.getValue
import kotlin.jvm.java


object Router : RouterContract {
    private lateinit var routerEntryPoint: RouterEntryPoint

    fun init(context: Context) {
        routerEntryPoint = EntryPointAccessors.fromApplication(context, RouterEntryPoint::class.java)
    }

    override val Home: HomeRouter by lazy { routerEntryPoint.homeRouter() }
    override val Task: TaskRouter by lazy { routerEntryPoint.taskRouter() }
    override val Mine: MineRouter by lazy { routerEntryPoint.mineRouter() }
    override val Login: LoginRouter by lazy { routerEntryPoint.loginRouter() }
    override val Benefit: BenefitRouter by lazy { routerEntryPoint.benefitRouter() }
    override val ZeroBuy: ZeroBuyRouter by lazy { routerEntryPoint.zeroBuyRouter() }
    override val Withdraw: WithdrawRouter by lazy { routerEntryPoint.withdrawRouter() }
    override val WithdrawSub: WithdrawSubRouter by lazy { routerEntryPoint.withdrawSubRouter() }
    override val WinRecord: WinRecordRouter by lazy { routerEntryPoint.winRecordBuyRouter() }
    override val Main: MainRouter by lazy { routerEntryPoint.mainRouter() }


    override val Privacy: IRouterPrivacy
        get() = routerEntryPoint.privacyRouter()
    override val Game: IRouterGame
        get() = routerEntryPoint.GameRouter()
    override val Version: IRouterVersion
        get() = routerEntryPoint.versionRouter()
    override val Feedback: IRouterFeedback
        get() = routerEntryPoint.feedbackRouter()
    override val WithdrawRecord: IRouterWithdrawRecord
        get() = routerEntryPoint.withdrawRecordRouter()

    override val Splash: IRouterSplash
        get() = routerEntryPoint.splashRouter()

    override val WatchAd: IRouterWatchAd
        get() = routerEntryPoint.watchAdRouter()
}

