package com.gh.gamecenter.beiziad

import android.content.Context
import android.view.View
import android.widget.FrameLayout
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IStartUpAdProvider

@Route(path = RouteConsts.provider.adSdk, name = "开屏广告暴露服务")
class StartUpAdProviderImpl : IStartUpAdProvider {
    override fun initSDK(context: Context) {
        BeiziAdHelper.initBeiziSDK(context)
    }

    override fun initOAID(context: Context, callback: (String) -> Unit) {
        BeiziAdHelper.initOAID(context, callback)
    }

    override fun initStartUpAd(startAdContainer: View, adsFl: FrameLayout, showAd: Boolean, hideCallback: () -> Unit) {
        BeiziAdHelper.initBeiziStartUpAd(startAdContainer, adsFl, showAd, hideCallback)
    }

    override fun cancelStartUpAd(context: Context) {
        BeiziAdHelper.cancelBeiziStartUpAd(context)
    }

    override fun shouldEnableSDK(channel: String): Boolean {
        return BeiziAdHelper.shouldEnableSDK(channel)
    }

    override fun init(context: Context?) {
        // Do nothing
    }
}