package com.nivesh.production.partnerOnBoarding.interfaces

import com.google.gson.JsonObject
import com.nivesh.production.partnerOnBoarding.model.*
import com.nivesh.production.partnerOnBoarding.model.request.PartnerRequest
import com.nivesh.production.partnerOnBoarding.model.request.SendOTPRequest
import com.nivesh.production.partnerOnBoarding.model.request.ValidatePartnerRequest
import com.nivesh.production.partnerOnBoarding.model.response.PartnerDetailResponse
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.Response
import retrofit2.http.*

interface ApiInterface {

    @POST("Partner/CreatePartner")
    suspend fun postPartnerCreation(@Body partnerRequest: PartnerRequest): Response<JsonObject>

    @GET("Partner/GetPartnerDetails")
    suspend fun getPartnerDetail(
        @Query("PartnerCode") code: String,
        @Header("AccessKey") value: String
    ): Response<JsonObject>

    @POST("Partner/ValidatePartner")
    suspend fun postPartnerValidate(@Body validatePartnerRequest: ValidatePartnerRequest): Response<JsonObject>

    @POST("Partner/SendOTP")
    suspend fun postOTP(@Body sendOTPRequest: SendOTPRequest): Response<JsonObject>

    @POST("Partner/SendOTP")
    suspend fun postSaveEagreementOTP(@Body sendOTPRequest: SendOTPRequest): Response<JsonObject>

    @POST("Partner/VerifyOTP")
    suspend fun postVerifyOTP(@Body requestBody: RequestBody): Response<JsonObject>

    @POST("Partner/GetAMFIDetail")
    suspend fun postAMFIDetail(@Body requestBody: RequestBody): Response<JsonObject>

    @GET("User/GetPANDetail")
    suspend fun getPANDetail(@Query("PAN") value: String): Response<JsonObject>

    @GET("User/GetAllDocumentsType")
    suspend fun getDocumentType(
        @Query("Role") value: String,
        @Query("Type") type: String
    ): Response<JsonObject>

    @Multipart
    @POST("Partner/DocumentsUpload")
    suspend fun getUploadDocument(
//        @Part multiPartBody: List<MultipartBody.Part>,
        @Part multiPartBody: MultipartBody.Part,
        @Part("PartnerCode") partnerCode: Int,
        @Part("PartnerRole") partnerRole: Int,
        @Part("DocumentId") documentId: Int,
        @Part("FileId") fileId: Int
    ): Response<JsonObject>

    @POST("Partner/SaveEAgreement")
    suspend fun postSaveEAgreement(@Body requestBody: RequestBody): Response<JsonObject>

    @GET("User/GetAllProduct")
    suspend fun getAllProduct(): Response<JsonObject>

    @GET("User/GetAreaDetailByPincode")
    suspend fun getAreaDetailByPinCode(@Query("Pincode") value: String): Response<JsonObject>
}