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) {

    private lateinit var mHelpCreateFenceAdapter: HelpTextImageTypeAdapter

    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_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_create_fence_tip3), menuType = MultipleEntity.IMG_IMG
        )
        ViewUtil.instance.addMenuBean(
            menuList, "", imageResId = R.drawable.create_fence_help3, menuType = MultipleEntity.IMG
        )
        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
        )

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