package com.gamedog.vididin.beans


import com.viddin.videos.free.R
import kotlin.Int

const val RECORD_GOLD_PLUS_WATCH_VIDEO_BY_TIME_DURATION: Int = 1
const val RECORD_GOLD_PLUS_WATCH_REWARD_AD: Int = 2
const val RECORD_GOLD_PLUS_NEWBIE_GIFT: Int = 3
const val RECORD_GOLD_PLUS_TASK_ENABLE_NOTIFY: Int = 4
const val RECORD_GOLD_PLUS_TASK_FIRST_WITHDRAW: Int = 5
const val RECORD_GOLD_PLUS_TASK_JOIN_DISCORD: Int = 6
const val RECORD_GOLD_PLUS_TASK_SIGN: Int = 7
const val RECORD_GOLD_PLUS_TASK_DAILY_AD: Int = 8
const val RECORD_GOLD_PLUS_TASK_DAILY_VIDEO: Int = 9
const val RECORD_GOLD_MINUS_CONVERT_2_CASH: Int = 10



open class RecordGold(var recordType: Int = 0, var amountNum: Long = 0): BaseRecord() {
    var isSuccess: Boolean = false
}

class RecordGoldShow: RecordGold() {
    var title: Int = 0
    var description: Int = 0
    var iconRes: Int = 0
}


fun RecordGold.toShowBean(): RecordGoldShow {
    return RecordGoldShow().apply {
        this@apply.uuid = this@toShowBean.uuid
        this@apply.dateMs = this@toShowBean.dateMs
        this@apply.isSuccess = this@toShowBean.isSuccess
        this@apply.amountNum = this@toShowBean.amountNum
        this@apply.recordType = this@toShowBean.recordType



        when (this@apply.recordType) {
            RECORD_GOLD_PLUS_WATCH_VIDEO_BY_TIME_DURATION -> {
                title = R.string.record_gold_title_watch_video_time_duration
                description = R.string.record_gold_descr_watch_video_time_duration
                iconRes = R.mipmap.icon_video_task
            }

            RECORD_GOLD_PLUS_WATCH_REWARD_AD -> {
                title = R.string.record_gold_title_watch_reward_ad
                description = R.string.record_gold_descr_watch_reward_ad
                iconRes = R.mipmap.icon_ad
            }

            RECORD_GOLD_PLUS_NEWBIE_GIFT -> {
                title = R.string.record_gold_title_newbie_gift
                description = R.string.record_gold_descr_newbie_gift
                iconRes = R.mipmap.icon_gift
            }

            RECORD_GOLD_PLUS_TASK_ENABLE_NOTIFY -> {
                title = R.string.record_gold_title_enable_notify
                description = R.string.record_gold_descr_enable_notify
                iconRes = R.mipmap.icon_notify
            }

            RECORD_GOLD_PLUS_TASK_FIRST_WITHDRAW -> {
                title = R.string.record_gold_title_first_withdraw
                description = R.string.record_gold_descr_first_withdraw
                iconRes = R.mipmap.icon_dollar
            }

            RECORD_GOLD_PLUS_TASK_JOIN_DISCORD -> {
                title = R.string.record_gold_title_join_discord
                description = R.string.record_gold_descr_join_discord
                iconRes = R.mipmap.icon_discord_2
            }

            RECORD_GOLD_PLUS_TASK_SIGN -> {
                title = R.string.record_gold_title_sign
                description = R.string.record_gold_descr_sign
                iconRes = R.mipmap.icon_calendar
            }

            RECORD_GOLD_PLUS_TASK_DAILY_AD -> {
                title = R.string.record_gold_title_daily_task_ad
                description = R.string.record_gold_descr_daily_task_ad
                iconRes = R.mipmap.icon_ad
            }

            RECORD_GOLD_PLUS_TASK_DAILY_VIDEO -> {
                title = R.string.record_gold_title_daily_task_video
                description = R.string.record_gold_descr_daily_task_video
                iconRes = R.mipmap.icon_video_task
            }

            RECORD_GOLD_MINUS_CONVERT_2_CASH -> {
                title = R.string.record_gold_title_convert_2_cash
                description = R.string.record_gold_descr_convert_2_cash
                iconRes = R.mipmap.icon_convert_cash
            }
        }
    }
}