package com.casic.br.view

import androidx.recyclerview.widget.DividerItemDecoration
import com.casic.br.R
import com.casic.br.adapter.IconTextListAdapter
import com.casic.br.utils.LocaleConstant
import com.gyf.immersionbar.ImmersionBar
import com.pengxh.kt.lite.base.KotlinBaseActivity
import com.pengxh.kt.lite.extensions.convertColor
import com.pengxh.kt.lite.utils.ImmerseStatusBarUtil
import kotlinx.android.synthetic.main.activity_settings.*
import kotlinx.android.synthetic.main.include_base_title.*

class SettingsActivity : KotlinBaseActivity() {

    override fun initLayoutView(): Int = R.layout.activity_settings

    override fun setupTopBarLayout() {
        ImmersionBar.with(this).statusBarDarkFont(true).init()
        ImmerseStatusBarUtil.setColor(this, R.color.white.convertColor(this))

        leftBackView.setOnClickListener { finish() }
        titleView.text = "系统设置"
    }

    override fun initData() {
        val settingsListAdapter = IconTextListAdapter(this, LocaleConstant.SETTINGS_OPERATE)
        settingsRecyclerView.addItemDecoration(
            DividerItemDecoration(this, DividerItemDecoration.VERTICAL)
        )
        settingsRecyclerView.adapter = settingsListAdapter
        settingsListAdapter.setOnGridItemClickListener(object :
            IconTextListAdapter.OnListItemClickListener {
            override fun onItemClick(position: Int) {
                when (position) {
                    0 -> {}
                    1 -> {}
                    2 -> {}
                    3 -> {}
                    4 -> {}
                }
            }
        })
    }

    override fun observeRequestState() {

    }

    override fun initEvent() {

    }
}