package com.easy.clean.business.ads

/**
 * 广告类型
 * 0=开屏广告、1=插屏广告、2=原生广告、3=Banner横幅广告
 */
@JvmInline
value class AdsType private constructor(val value: Int) {
    companion object {
        val OPEN = AdsType(0)
        val INSERT = AdsType(1)
        val NATIVE = AdsType(2)
        val BANNER = AdsType(3)
        fun from(adsType: Int): AdsType {
            return when (adsType) {
                OPEN.value -> OPEN
                INSERT.value -> INSERT
                NATIVE.value -> NATIVE
                else -> BANNER
            }
        }
    }
}