package com.adealink.weparty.share.qrcode.page

import androidx.fragment.app.viewModels
import com.adealink.frame.base.fastLazy
import com.adealink.frame.mvvm.view.viewBinding
import com.adealink.weparty.commonui.BaseFragment
import com.adealink.weparty.module.playmate.PlaymateModule
import com.adealink.weparty.module.playmate.data.UserPlaymateCategoryData
import com.adealink.weparty.share.R
import com.adealink.weparty.share.databinding.FragmentCommonQrCodeBinding
import com.adealink.weparty.share.qrcode.viewmodel.QRCodeViewModel
import com.adealink.weparty.share.viewmodel.ShareViewModelFactory
import kotlin.getValue

class CommonQRCodeFragment : BaseFragment(R.layout.fragment_common_qr_code) {


    private val binding by viewBinding(FragmentCommonQrCodeBinding::bind)

    private val qrCodeViewModel by viewModels<QRCodeViewModel>(ownerProducer = {
        parentFragment ?: this
    }, factoryProducer = { ShareViewModelFactory() })

    override fun initViews() {
        super.initViews()
    }

    override fun observeViewModel() {
        super.observeViewModel()
        qrCodeViewModel.currentCategoryLD.observe(this) {
            updatePanel(it)
        }
    }

    private fun updatePanel(data: UserPlaymateCategoryData?) {

    }

}