package com.gh.common.pop

import android.content.Context
import android.view.LayoutInflater
import com.gh.common.dialog.OnReserveSuccessListener
import com.gh.gamecenter.R
import com.gh.gamecenter.common.databinding.LayoutPopupContainerBinding

class EditBindWechatPop(
    binding: LayoutPopupContainerBinding,
    private val listener: OnReserveSuccessListener
) : CommonPopupWindow(binding) {

    override val viewDataList: List<ViewData>
        get() = listOf(
            ViewData(R.string.change_the_wechat_binding, listener::changeWechatBinding)
        )

    companion object {

        fun create(context: Context, listener: OnReserveSuccessListener): EditBindWechatPop {
            val inflater = LayoutInflater.from(context)
            return EditBindWechatPop(LayoutPopupContainerBinding.inflate(inflater), listener).apply { initView() }
        }
    }
}