package com.adealink.weparty.wallet.pay

import android.app.Activity
import android.content.Intent
import com.adealink.frame.base.Rlt
import com.adealink.weparty.module.wallet.data.Currency
import com.adealink.weparty.module.wallet.data.PayChannel
import com.adealink.weparty.wallet.recharge.data.RechargeProduct

interface IPayManager {
    suspend fun setupPayChannel(channel: PayChannel): Rlt<Any>
    suspend fun getAllRechargeList(channel: PayChannel): Rlt<Map<Currency, List<RechargeProduct>>>
    suspend fun getRechargeList(channel: PayChannel, currency: Currency): Rlt<List<RechargeProduct>>
    suspend fun buyProduct(
        activity: Activity,
        productInfo: RechargeProduct,
        createdOrderId: String? = null,
    ): Rlt<Any>

    fun queryAndHandleUnDealPurchases()
    fun onActivityResult(requestCode: Int, resultCode: Int, intent: Intent?)
}