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

import com.abbidot.tracker.R
import com.abbidot.tracker.adapter.HelpTextImageTypeAdapter
import com.abbidot.tracker.base.BaseActivity
import com.abbidot.tracker.bean.MenuTxtBean
import com.abbidot.tracker.constant.MultipleEntity
import com.abbidot.tracker.databinding.ActivityHelpCreatePetFenceBinding
import com.abbidot.tracker.util.ViewUtil

class HelpCreatePetFenceActivity :
    BaseActivity<ActivityHelpCreatePetFenceBinding>(ActivityHelpCreatePetFenceBinding::inflate) {

    override fun getTopBar() = mViewBinding.ilHelpCreatePetFenceBar.titleTopBar

    override fun initData() {
        super.initData()
        setTopBarTitle(R.string.txt_create_pet_fence)
        setLeftBackImage(R.drawable.icon_white_back_svg)

        val menuList = mutableListOf<MenuTxtBean>()
        ViewUtil.instance.addMenuBean(
            menuList, getString(R.string.txt_create_fence_tip1), menuType = MultipleEntity.IMG_IMG
        )
        ViewUtil.instance.addMenuBean(
            menuList, "", imageResId = R.drawable.create_fence_help1, menuType = MultipleEntity.IMG
        )
        ViewUtil.instance.addMenuBean(
            menuList, getString(R.string.txt_set_fence_type)
        )
        ViewUtil.instance.addMenuBean(
            menuList, getString(R.string.txt_fence_type_help), menuType = MultipleEntity.IMG_IMG
        )
        ViewUtil.instance.addMenuBean(
            menuList, getString(R.string.txt_set_boundary)
        )
        ViewUtil.instance.addMenuBean(
            menuList, getString(R.string.txt_create_fence_tip2), menuType = MultipleEntity.IMG_IMG
        )
        ViewUtil.instance.addMenuBean(
            menuList, "", imageResId = R.drawable.create_fence_help2, menuType = MultipleEntity.IMG
        )
        ViewUtil.instance.addMenuBean(
            menuList, getString(R.string.txt_enable_set_notify)
        )
        ViewUtil.instance.addMenuBean(
            menuList, getString(R.string.txt_create_fence_tip3), menuType = MultipleEntity.IMG_IMG
        )
        ViewUtil.instance.addMenuBean(
            menuList, "", imageResId = R.drawable.create_fence_help4, menuType = MultipleEntity.IMG
        )
        ViewUtil.instance.addMenuBean(
            menuList, getString(R.string.txt_edit_delete_fence)
        )
//        ViewUtil.instance.addMenuBean(
//            menuList, getString(R.string.txt_create_fence_tip4), menuType = MultipleEntity.IMG_IMG
//        )
//        ViewUtil.instance.addMenuBean(
//            menuList, "", imageResId = R.drawable.create_fence_help4, menuType = MultipleEntity.IMG
//        )

        val helpCreateFenceAdapter = HelpTextImageTypeAdapter(menuList)
        ViewUtil.instance.setRecyclerViewVerticalLinearLayout(
            mContext, mViewBinding.rvHelpCreatePetFenceContent, helpCreateFenceAdapter
        )
    }
}