package com.adealink.weparty.profile.blacklist

import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.updateLayoutParams
import com.adealink.frame.aab.util.getCompatDimension
import com.adealink.frame.mvvm.view.viewBinding
import com.adealink.frame.router.Router
import com.adealink.frame.router.annotation.BindExtra
import com.adealink.frame.router.annotation.RouterUri
import com.adealink.frame.util.statusBarHeight
import com.adealink.weparty.commonui.BaseActivity
import com.adealink.weparty.module.profile.Profile
import com.adealink.weparty.profile.databinding.ActivityProfileBlackListBinding
import com.adealink.weparty.R as APP_R

@RouterUri(
    path = [Profile.BlackList.PATH],
    desc = "黑名单页面"
)
class BlackListActivity : BaseActivity() {

    @BindExtra(name = Profile.Common.EXTRA_UID)
    var userUid: String = ""

    private val binding by viewBinding(ActivityProfileBlackListBinding::inflate)

    override fun onBeforeCreate() {
        super.onBeforeCreate()
        Router.bind(this)
    }

    override fun initViews() {
        super.initViews()
        setContentView(binding.root)
        val statusBarHeight = this@BlackListActivity.statusBarHeight()
        binding.topBar.setPadding(0, statusBarHeight, 0, 0)
        binding.topBar.updateLayoutParams<ConstraintLayout.LayoutParams> {
            height =
                getCompatDimension(APP_R.dimen.common_top_bar_height).toInt() + this@BlackListActivity.statusBarHeight()
        }

    }


}