package com.nivesh.production.partnerOnBoarding.repositories

import com.nivesh.production.partnerOnBoarding.interfaces.ApiInterface
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 okhttp3.MultipartBody
import okhttp3.RequestBody


class MainRepository constructor(private val apiInterface: ApiInterface) {
    suspend fun getPartnerCreationResponse(requestBody: PartnerRequest, token: String) =
        apiInterface.postPartnerCreation(requestBody)

    suspend fun getPartnerDetailResponse(value: String, token: String) =
        apiInterface.getPartnerDetail(value,token)

    suspend fun getValidatePartnerResponse(validatePartnerRequest: ValidatePartnerRequest) =
        apiInterface.postPartnerValidate(validatePartnerRequest)

    suspend fun getSendOTPResponse(sendOTPRequest: SendOTPRequest) =
        apiInterface.postOTP(sendOTPRequest)

    suspend fun getSendSaveEAgreementOTPResponse(sendOTPRequest: SendOTPRequest) =
        apiInterface.postSaveEagreementOTP(sendOTPRequest)

    suspend fun getVerifyOTP(requestBody: RequestBody) =
        apiInterface.postVerifyOTP(requestBody)

    suspend fun getAMFIDetailResponse(requestBody: RequestBody) =
        apiInterface.postAMFIDetail(requestBody)

    suspend fun getPANDetailResponse(value: String) =
        apiInterface.getPANDetail(value)

    suspend fun getDocumentTypeResponse(value: String,type: String) =
        apiInterface.getDocumentType(value,type)

    suspend fun getDocumentUploadResponse(multipartBody: MultipartBody.Part,pc: Int,pr: Int,di: Int,fileId: Int) =
        apiInterface.getUploadDocument(multipartBody,pc,pr,di,fileId)

    suspend fun getSaveEAgreement(requestBody: RequestBody, token: String) =
        apiInterface.postSaveEAgreement(requestBody)

    suspend fun getAllProduct() =
        apiInterface.getAllProduct()

    suspend fun getAreaDetailByPinCode(value: String) =
        apiInterface.getAreaDetailByPinCode(value)
}