package com.adealink.weparty.call.comp

import androidx.lifecycle.LifecycleOwner
import com.adealink.frame.util.onClick
import com.adealink.weparty.call.databinding.LayoutCallTopBarBinding
import com.adealink.weparty.commonui.BaseViewComponent
import com.tencent.qcloud.tuikit.tuicallkit.manager.CallManager

class CallTopComp(
    lifecycleOwner: LifecycleOwner,
    private val binding: LayoutCallTopBarBinding,
    private val finishActivity: () -> Unit
) : BaseViewComponent(lifecycleOwner) {

    override fun initViews() {
        super.initViews()
        binding.btnMini.onClick {
            CallManager.instance.showCallingFloatWindow {
                finishActivity.invoke()
            }
        }
    }

}