package com.base.locationsharewhite.fcm

import org.json.JSONObject

object PopupConstObject {

    //推送触发位置
    const val POPUP_WHERE_TIMBER = "Timer"
    const val POPUP_WHERE_LOCK = "Lock"
    const val POPUP_WHERE_FCM = "fcm"
    const val POPUP_WHERE_ALARM = "Alarm"
    const val POPUP_WHERE_BATTERY = "battery"
    const val POPUP_WHERE_PACKAGE = "package"

    const val POPUP_WHERE_WORK_MANAGER = "workmanager"
    const val POPUP_WHERE_HOVER_HANDLE = "hover_handle"//悬停调用

    //推送总开关 0 关 1开
    const val popup_status = "popup_status"

    //推送总数量现在
    const val popup_count = "popup_count"//所有常规推送的当日推送次数限制，0 为不限制

    const val popup_start = "popup_start"
    const val popup_end = "popup_end"
    const val popup_interval = "popup_interval"
    const val popup_timer_interval = "popup_timber_interval"
    const val popup_fcm_interval = "popup_fcm_interval"

    const val popup_hover_status = "popup_hover_status"
    const val popup_hover_count = "popup_hover_count"
    const val popup_hover_delay = "popup_hover_delay"

    //定时器
    const val timerS = "timerS"
    const val timerDelay = "timerDelay"
    const val timerInterval = "timerInterval"

    //电量可配置值
    const val popup_battery_count = "popup_battery_count"
    const val popup_battery_interval = "popup_battery_interval"

    //安装卸载可配置值
    const val popup_package_count = "popup_package_count"
    const val popup_package_interval = "popup_package_interval"

    //解锁可配置值
    const val lockS = "lockS"
    const val popup_screen_count = "popup_screen_count"
    const val popup_screen_interval = "popup_screen_interval"


    const val ACTION_STAY_HOME = "action_stay_home"
    const val ACTION_STAY_MY_CODE = "action_stay_my_code"
    const val ACTION_STAY_SHARE = "action_stay_share"
    const val ACTION_STAY_SETTING = "action_stay_setting"


    const val ACTION_1 = "action_1"
    const val ACTION_2 = "action_2"
    const val ACTION_3 = "action_3"
    const val ACTION_4 = "action_4"
    const val ACTION_5 = "action_5"
    const val ACTION_6 = "action_6"
    const val ACTION_7 = "action_7"

    fun createDefaultPopupJson(): JSONObject {
        val json = JSONObject()

        //通知总的条件
        json.put(popup_status, "1")
        json.put(popup_start, "0")
        json.put(popup_end, "24")
        json.put(popup_interval, "1")
        json.put(popup_timer_interval, "7")
        json.put(popup_fcm_interval, "1")

        json.put(popup_hover_status, "1")
        json.put(popup_hover_count, "4")
        json.put(popup_hover_delay, "1000")

        json.put(timerS, "1")
        json.put(timerDelay, "1")
        json.put(timerInterval, "1")

        json.put(popup_battery_count, "20")
        json.put(popup_battery_interval, "60")

        json.put(popup_package_count, "20")
        json.put(popup_package_interval, "1")

        json.put(lockS, "1")
        json.put(popup_screen_count, "20")
        json.put(popup_screen_interval, "1")

        return json
    }
}