package com.base.appzxhy.drouterimp

import android.app.Activity
import android.widget.FrameLayout
import com.base.appzxhy.R
import com.base.appzxhy.ads.AdsMgr
import com.base.appzxhy.utils.LogEx
import com.didi.drouter.annotation.Service
import com.koko.router.ad.NativeBatteryType
import com.koko.router.ad.NativeAdService

@Service(function = [NativeAdService::class])
class NativeAdServiceImp : NativeAdService {

    private val TAG = "NativeServiceImp"

    override fun showNative(activity: Activity, flAd: FrameLayout, nativeType: String) {
        LogEx.logDebug(TAG, "activity=${activity::class.java.simpleName}")
        val layout = when (nativeType) {
            NativeBatteryType -> R.layout.layout_admob_native_custom
            else -> R.layout.layout_admob_native_custom
        }
        AdsMgr.showNative(activity, flAd, layout)
    }


}