package com.hongyegroup.cpt_pensonal.ui.fragment

import com.guadou.cs_cptservices.base.fragment.YYBaseVDBFragment
import com.guadou.lib_baselib.base.vm.EmptyViewModel
import com.guadou.lib_baselib.bean.DataBindingConfig
import com.hongyegroup.cpt_pensonal.BR
import com.hongyegroup.cpt_pensonal.R
import com.hongyegroup.cpt_pensonal.databinding.FragmentPensonalCompanyInfoBinding
import com.hongyegroup.cpt_pensonal.ui.activity.PensonalJoinByIdActivity
import com.hongyegroup.cpt_pensonal.ui.activity.PensonalScanQRCodeActivity

/**
 * 个人用户 首页第一个Tab
 * 公司信息
 */
class PensonalCompanyInfoFragment : YYBaseVDBFragment<EmptyViewModel, FragmentPensonalCompanyInfoBinding>() {

    override fun getDataBindingConfig(): DataBindingConfig {
        return DataBindingConfig(R.layout.fragment_pensonal_company_info)
            .addBindingParams(BR.click, ClickProxy())
    }

    override fun startObserve() {

    }

    override fun init() {
        setStatusBarWhiteText()

    }

    fun scrollTopRefresh() {

    }

    override fun onHiddenChanged(hidden: Boolean) {
        super.onHiddenChanged(hidden)
        if (!hidden) {
            setStatusBarWhiteText()
        }
    }

    /**
     * DataBinding事件处理
     */
    inner class ClickProxy {

        fun gotoScanCodePage() {
            PensonalScanQRCodeActivity.startInstance()
        }

        fun gotoJoinByIdPage() {
            PensonalJoinByIdActivity.startInstance()
        }

    }

}