package com.app.simplitend.welcome.welcomecg;

import com.app.simplitend.welcome.welcomecg.mvvm.CareGiverData;
import com.app.simplitend.welcome.welcomecg.mvvm.CgForgotPwdResult;
import com.app.simplitend.welcome.welcomecg.mvvm.ConnectCgResult;
import com.app.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;

import java.util.Map;

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.PartMap;
import retrofit2.http.Query;

public interface WelcomeApiService {

    @Multipart
    @POST("api/auth/caregiver-register")
    Call<CallResponse<CareGiverData>> registerCareGiver(@PartMap Map<String, RequestBody> body);

    @POST("api/auth/caregiver-login")
    Call<CallResponse<CareGiverData>> loginCaregiver(@Body Map<String, String> body);

    @POST("api/auth/patient-caregiver-connect")
    Call<CallResponse<Object>> verifyCgOTP(@Body Map<String, String> body);

    @GET("api/auth/forgot-caregiver-password")
    Call<CallResponse<CgForgotPwdResult>> sendForgotCodeEmail(@Header("email") String email);

    @POST("api/auth/verify-caregiver-otp")
    Call<CallResponse<String>> verifyForgotOTP(@Body Map<String, String> body);

    @Multipart
    @POST("api/auth/change-caregiver-password")
    Call<CallResponse<CareGiverData>> changeCgPassword(@PartMap Map<String, RequestBody> body);

    @POST("api/auth/patient-caregiver-connect")
    Call<CallResponse<ConnectCgResult>> connectCg(@Body Map<String, String> body);

    @POST("api/resent-patient-caregiver-link-code")
    Call<CallResponse<Object>> resendCgCode(@Body Map<String, String> body,
                                            @Header("Authorization") String token);

    @GET("api/caregiver-user-data")
    Call<CallResponse<CareGiverData>> getCgUserData(@Header("Authorization") String token,
                                                    @Query("player_id") String player_id);

}
