package com.base.appzxhy.drouterimp

import android.app.Activity
import com.base.appzxhy.ads.AdsMgr
import com.base.appzxhy.ads.AdsShowCallBack
import com.didi.drouter.annotation.Service
import com.koko.router.ad.InterAdService

@Service(function = [InterAdService::class])
class InterAdServiceImp : InterAdService {

    override fun showInterAd(activity: Activity, interWhere: String, callBack: () -> Unit) {

        val isUnLimit = false

        AdsMgr.showInsert(activity, isUnLimit, object : AdsShowCallBack() {
            override fun close(where: Int) {
                callBack.invoke()
            }

            override fun failed(where: Int) {
                callBack.invoke()
            }

            override fun googleFailed(where: Int) {
                callBack.invoke()
            }
        })
    }

}