package com.quyunshuo.module.home.dialog

import android.content.Context
import com.hboxs.serialport.plc.DialogClickListener
import com.quyunshuo.androidbaseframemvvm.base.mvvm.v.BaseFrameDialog
import com.quyunshuo.module.home.databinding.HomeDialogPayChooseBinding

/**
 * 支付方式选择框UI：
 * 1. 左上方显示商品的图片
 * 2. 左下方显示商品的金额
 * 3. 右上方显示支付方式
 * 4. 右下方显示支付的操作流程：如二维码等。
 */
class PayChooseDialog(mContext: Context) : BaseFrameDialog<HomeDialogPayChooseBinding>(mContext) {
    private var connectionServerDialoglistener: DialogClickListener? = null
    var type1:Int =1
    var type2:Int =2
    private var payDialog:PayDialog? = null
    override fun HomeDialogPayChooseBinding.initView() {
        ivBack.setOnClickListener {
            dismiss()
        }
//        homeTextview4.setOnClickListener{
//            if (payDialog==null) {
//                payDialog = PayDialog(mContext)
//
//            }
//            payDialog?.show()
//            connectionServerDialoglistener?.onClickListener(type1,null)
//        }
    }

    override fun createVB() = HomeDialogPayChooseBinding.inflate(layoutInflater)


    override fun initObserve() {
    }

    override fun initRequestData() {
    }
    fun setListener(listener: DialogClickListener) {
        this.connectionServerDialoglistener = listener
    }


}