package com.abbidot.tracker.ui.activity.help

import android.view.View
import com.abbidot.tracker.R
import com.abbidot.tracker.base.BaseActivity
import com.abbidot.tracker.constant.ConstantInt
import com.abbidot.tracker.constant.ConstantString
import com.abbidot.tracker.databinding.ActivityHelpTrackerStatusBinding

class HelpTrackerStatusActivity :
    BaseActivity<ActivityHelpTrackerStatusBinding>(ActivityHelpTrackerStatusBinding::inflate) {

    private var mType = ConstantInt.Type0

    override fun getTopBar() = mViewBinding.ilHelpTrackerStatusBar.titleTopBar

    override fun initData() {
        super.initData()
        intent.extras?.apply {
            mType = getInt(ConstantString.Type, ConstantInt.Type0)
        }
        mViewBinding.apply {
            when (mType) {
                0 -> {
                    setTopBarTitle(R.string.txt_check_tracker_status)
                    setLeftBackImage(R.drawable.icon_white_back_svg)
                    ilHelpTrackerStatusTitle1.tvHelpTitleOne.setText(R.string.txt_check_tracker_status_top_tip)
                }

                1 -> {
                    setTopBarTitle(R.string.txt_sleep_mode)
                    setLeftBackImage(R.drawable.icon_white_back_svg)
                    ilHelpTrackerStatusTitle1.tvHelpTitleOne.setText(R.string.txt_sleep_mode_help)
                    ivHelpTrackerStatusImage.visibility = View.GONE
                }

                2 -> {
                    setTopBarTitle(R.string.txt_wifi_zone_home)
                    setLeftBackImage(R.drawable.icon_white_back_svg)
                    ilHelpTrackerStatusTitle1.tvHelpTitleOne.setText(R.string.txt_wifi_zone_home_help)
                    ivHelpTrackerStatusImage.visibility = View.GONE
                }

                3 -> {
                    setTopBarTitle(R.string.tracker_manage_set_duration)
                    setLeftBackImage(R.drawable.icon_white_back_svg)
                    ilHelpTrackerStatusTitle1.tvHelpTitleOne.setText(R.string.txt_gps_update_help)
                    ivHelpTrackerStatusImage.visibility = View.GONE
                }
            }
        }
    }
}