package com.test.basd.smartjunkcleaner.bean

data class ConfigBean(
    val newuser_avoid_time: Int = 0,
    val all_push_interval: Int = 0,
    val loop_interval: Int = 0,
    val push_interval_11001: Int = 0,
    val push_interval_11002: Int = 0,
    val push_interval_11003: Int = 0,
    val push_interval_11004: Int = 0,
    val push_interval_11005: Int = 0,
    val push_interval_11006: Int = 0,
    val push_interval_11007: Int = 0,
    val push_interval_11008: Int = 0,
    val push_interval_11009: Int = 0,
    val push_interval_11010: Int = 0,
    val push_interval_11011: Int = 0,
    val push_interval_11012: Int = 0,
    val push_interval_11013: Int = 0,
    val push_interval_11014: Int = 0,
    val push_interval_11015: Int = 0,
    val push_interval_11016: Int = 0,
    val push_interval_11017: Int = 0,
    val push_interval_22001: Int = 0,
    val push_interval_22002: Int = 0,
    val push_interval_22003: Int = 0,
    val push_interval_22004: Int = 0,
    val push_interval_22005: Int = 0,
    val push_interval_22006: Int = 0,
    val push_interval_22007: Int = 0,
    val push_interval_22011: Int = 0,
    val push_circle_order: List<Int> = listOf(),
    val native_show_limit: Int = 40,
    val inter_show_limit: Int = 40,
    val open_time_out: Int = 10,
    val isNowPlayAd: Int = 0//关闭限制
) {
    companion object {
        //功能触发push actionId 主动发送
        const val ID_JUNK_CLEAN_PUSH = 11001 //清理垃圾
        const val ID_BOOST_PUSH = 11002 //性能优化

        //        const val ID_VIRUS_PUSH = 11003//扫描病毒，trustlook目前不加
        const val ID_BATTERY_PUSH = 11004// 电量信息
        const val ID_COOL_PUSH = 11005//手机降温
        const val ID_LARGE_FILE_PUSH = 11006// 大文件清理
        const val ID_DUPLICATE_FILE_PUSH = 11007//文件备份,重复文件,相似文件
        const val ID_VIDEO_CLEAN_PUSH = 11008//清理视频缓存
        const val ID_PHOTO_CLEAN_PUSH = 11009//清理相册
        const val ID_PHOTO_COMPRESS = 11010//照片压缩
        const val ID_APP_MANAGER = 11011//应用管理
        const val ID_NETWORK_TRAFFIC = 11012//网络流量
        const val ID_CLEAN_NOTIFICATION = 11013//清理通知栏
        const val ID_RECENT_USE_APP = 11014//最近使用APP
        const val ID_SIMILAR_IMAGE = 11015//清理相似图片
      //  const val ID_CLEAN_SPEAKER = 11016//清理扬声器
//        const val ID_BATTERY_OPTIMIZATION = 11017//电池优化,目前是虚假功能

        //场景触发push actionId 被动发送
        const val ID_WIFI_PUSH = 22001//连接wifi时
        const val ID_INSTALL_PACKAGE_PUSH = 22002//安装应用
        const val ID_UNINSTALL_PACKAGE_PUSH = 22003//卸载应用
        const val ID_CHARGE = 22004//充电
        const val ID_LOW_BATTERY_PUSH = 22005//电量低于阈值时
        const val ID_LOW_RAM_PUSH = 22007//内存低于阈值
//        const val ID_PHONE_ACCELERATE = 22011//手机加速,目前是虚假功能

        fun ConfigBean.getActionPushInterval(actionId: Int): Int {
            val interval = when (actionId) {
                ID_JUNK_CLEAN_PUSH -> push_interval_11001
                ID_BOOST_PUSH -> push_interval_11002
//                ID_VIRUS_PUSH -> push_interval_11003
                ID_BATTERY_PUSH -> push_interval_11004
                ID_COOL_PUSH -> push_interval_11005
                ID_LARGE_FILE_PUSH -> push_interval_11006
                ID_DUPLICATE_FILE_PUSH -> push_interval_11007
                ID_VIDEO_CLEAN_PUSH -> push_interval_11008
                ID_PHOTO_CLEAN_PUSH -> push_interval_11009
                ID_PHOTO_COMPRESS -> push_interval_11010
                ID_APP_MANAGER -> push_interval_11011
                ID_NETWORK_TRAFFIC -> push_interval_11012
                ID_CLEAN_NOTIFICATION -> push_interval_11013
                ID_RECENT_USE_APP -> push_interval_11014
                ID_SIMILAR_IMAGE -> push_interval_11015
//                ID_BATTERY_OPTIMIZATION -> push_interval_11017
                ID_WIFI_PUSH -> push_interval_22001
                ID_INSTALL_PACKAGE_PUSH -> push_interval_22002
                ID_UNINSTALL_PACKAGE_PUSH -> push_interval_22003
                ID_CHARGE -> push_interval_22004
                ID_LOW_BATTERY_PUSH -> push_interval_22005
                ID_LOW_RAM_PUSH -> push_interval_22007
//                ID_PHONE_ACCELERATE -> push_interval_22011
                else -> 0
            }
            return interval
        }
    }
}