package com.app.simplitend.caregiverdashboard.mvvm;

import com.app.simplitend.caregiverdashboard.mvvm.models.GeoFenceDetails;
import com.app.simplitend.welcome.welcomecg.mvvm.CareGiverData;
import com.app.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
import com.app.simplitend.welcome.welcomepatient.mvvm.models.PatientData;

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.Query;

public interface CgDashboardApiService {

    @GET("api/get-caregiver-patient-location-link")
    Call<CallResponse<GeoFenceDetails>> getGeofenceDetails(@Query("patientId") String p_id,
                                                           @Query("caregiverId") String c_id,
                                                           @Header("Authorization") String token);

    @POST("api/caregiver-patient-location-link")
    Call<CallResponse<GeoFenceDetails>> saveGeoFenceDetails(@Body GeoFenceDetails geoFenceDetails,
                                                            @Header("Authorization") String token);

    @Multipart
    @POST("api/caregiver-profile-update/{id}")
    Call<CallResponse<CareGiverData>> updateCaregiverData(@Path("id") int cg_xid,
                                                          @PartMap Map<String, RequestBody> body,
                                                          @Part MultipartBody.Part photo,
                                                          @Header("Authorization") String token);

    @Multipart
    @POST("api/patient-profile-update/{id}")
    Call<CallResponse<PatientData>> updatePatientData(@Path("id") int pat_xid,
                                                      @PartMap Map<String, RequestBody> body,
                                                      @Part MultipartBody.Part photo,
                                                      @Header("Authorization") String token);

    @POST("api/update-patient-address/{id}")
    Call<CallResponse<PatientData>> updatePatientAddress(@Path("id") int pat_xid,
                                                         @Body Map<String, String> body,
                                                         @Header("Authorization") String token);

    @Multipart
    @POST("api/caregiver-password-update/{id}")
    Call<CallResponse<CareGiverData>> updateCgPassword(@Path("id") int cg_xid,
                                                       @PartMap Map<String, RequestBody> body,
                                                       @Header("Authorization") String token);

    @POST("api/logout")
    Call<CallResponse<Object>> signOut(@Header("Authorization") String token);

}
