package com.app.simplitend.welcome.welcomepatient.mvvm;

import com.app.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.Contact;
import com.app.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactListResponse;
import com.app.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
import com.app.simplitend.welcome.welcomepatient.mvvm.models.OTPSentResponse;
import com.app.simplitend.welcome.welcomepatient.mvvm.models.PatientData;

import java.util.List;
import java.util.Map;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Path;
import retrofit2.http.Url;

public interface WelcomeApiService {

    @Multipart
    @POST("api/auth/patient-register")
    Call<CallResponse<PatientData>> registerPatient(@PartMap Map<String, RequestBody> body);

    @Multipart
    @POST("api/auth/patient-login")
    Call<CallResponse<PatientData>> loginPatient(@PartMap Map<String, RequestBody> credentials);

    @POST("api/auth/verify-patient-exists")
    Call<CallResponse<PatientData>> verifyEmail(@Body Map<String, String> body);

    @Multipart
    @POST
    Call<CallResponse<Contact>> createEditContact(@Url String URL,
                                       @PartMap Map<String, RequestBody> body,
                                       @PartMap Map<String, Integer> intBody,
                                       @Part MultipartBody.Part userImage,
                                       @Header("Authorization") String token);

    @GET("api/patients-contact-list")
    Call<CallResponse<List<ContactListResponse>>> getContactList(@Header("Authorization") String token);

    @POST("api/patient-contact-delete/{id}")
    Call<CallResponse<String>> deleteContact(@Header("Authorization") String token, @Path("id") int contact_id);

    @GET("api/auth/forgot-pin-enter-email")
    Call<CallResponse<OTPSentResponse>> sendOTPToEmail(@Header("email") String email_address);

    @Multipart
    @POST("api/auth/verify-patient-otp")
    Call<CallResponse<List<String>>> verifyOTP(@PartMap Map<String, RequestBody> body);

    @Multipart
    @POST("api/auth/change-patient-pin")
    Call<CallResponse<PatientData>> updatePin(@PartMap Map<String, RequestBody> body);
}
