package com.gamedog.vididin.netbase

import com.gamedog.vididin.VidiConst
import com.gamedog.vididin.beans.req.PayInitReq
import com.gamedog.vididin.beans.req.PayoutCheckReq
import com.gamedog.vididin.beans.req.PayoutReq
import com.gamedog.vididin.beans.resp.PayInit
import com.gamedog.vididin.beans.resp.PayoutCheckData
import com.gamedog.vididin.beans.resp.PayoutData
import okhttp3.ResponseBody
import retrofit2.http.Body
import retrofit2.http.Field
import retrofit2.http.FieldMap
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.HeaderMap
import retrofit2.http.POST
import retrofit2.http.QueryMap
import retrofit2.http.Url

interface ApiService {

    @GET
    suspend fun getRequest(
        @Url url: String,
        @HeaderMap headers: Map<String, String> = emptyMap(),
        @QueryMap params: Map<String, String> = emptyMap()
    ): ResponseBody

    @FormUrlEncoded
    @POST
    suspend fun postRequest(
        @Url url: String,
        @HeaderMap headers: Map<String, String> = emptyMap(),
        @FieldMap params: Map<String, String> = emptyMap(),
        @Field("JoinedPurchaseIds") JoinedPurchaseIds: List<Int> = emptyList<Int>(),
    ): ResponseBody

    @POST
    suspend fun postJsonRequest(
        @Url url: String,
        @HeaderMap headers: Map<String, String> = emptyMap(),
        @Body body: Any
    ): ResponseBody




    @POST(VidiConst.URL_WITHDRAW + "/eonline4/pay/init")
    suspend fun withdrawInit(@Body param: PayInitReq): PayInit

    @POST(VidiConst.URL_WITHDRAW + "/eonline4/payoutBrazil")
    suspend fun withdrawPayout(@Body param: PayoutReq): PayoutData

    @POST(VidiConst.URL_WITHDRAW + "/eonline4/payout/check")
    suspend fun withdrawCheck(@Body param: PayoutCheckReq): PayoutCheckData


}