package com.renitha.Interface;

import com.renitha.Model.InProgress_Response;
import com.renitha.Model.ResponseModel;
import com.renitha.Model.SetterComplaintDetails;
import com.renitha.Model.SetterContactUs;
import com.renitha.Model.SetterLogin;
import com.renitha.Model.SetterPMScalls;
import com.renitha.Model.SetterProfile;
import com.renitha.Model.SetterTicket;
import com.renitha.Model.SetterViewComplaintDetails;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;


public interface APIService {
    //the signin call
    @FormUrlEncoded
    @POST("api_login.php")
    Call<SetterLogin> userLogin(
            @Field("username") String mob_no,
            @Field("password") String password,
            @Field("LoginType") String LoginType
    );

    @FormUrlEncoded
    @POST("api_get_complaint_list.php")
    Call<List<SetterComplaintDetails>> getComplaintList(
            @Field("LoginID") String LoginID,
            @Field("LoginType") String LoginType,
            @Field("Flag") String flag

    );

    @FormUrlEncoded
    @POST("api_get_user_complaint_list.php")
    Call<List<SetterComplaintDetails>> getUserComplaintList(
            @Field("LoginID") String LoginID,
            @Field("LoginType") String LoginType,
            @Field("flag") String flag
    );

    @FormUrlEncoded
    @POST("api_complaint_status.php")
    Call<SetterLogin> setComplaintStatus(
            @Field("id") String id,
            @Field("flag") String flag,
            @Field("login_id") String login_id
    );

    @FormUrlEncoded
    @POST("api_complaint_status.php")
    Call<SetterLogin> setComplaintDone(
            @Field("id") String id,
            @Field("flag") String flag,
            @Field("CallNo") String CallNo,
            @Field("FaultDetails") String FaultDetails,
            @Field("ServicePerformed") String ServicePerformed,
            @Field("Preventive") String Preventive,
            @Field("BreakDown") String BreakDown,
            @Field("JobDate") String JobDate,
            @Field("StartTime") String StartTime,
            @Field("EndTime") String EndTime,
            @Field("tot_time") String tot_time,
            @Field("lat") Double lat,
            @Field("longi") Double longi,
            @Field("login_id") String login_id

    );

    @FormUrlEncoded
    @POST("api_get_my_profile.php")
    Call<SetterProfile> getMyProfile(
            @Field("LoginID") String LoginID,
            @Field("LoginType") String LoginType
    );

    @FormUrlEncoded
    @POST("api_get_contact_us.php")
    Call<SetterContactUs> getContactUs(
            @Field("comp_id") String comp_id
    );

    @FormUrlEncoded
    @POST("api_get_complaint_info.php")
    Call<SetterComplaintDetails> getComplaintInfo(
            @Field("id") String id
    );

    @FormUrlEncoded
    @POST("api_get_view_complaint_history.php")
    Call<InProgress_Response> getViewComplaintHistory(
            @Field("id") String id
    );
    @FormUrlEncoded
    @POST("api_get_pms_call_info.php")
    Call<SetterPMScalls> getPMSCallResult(
            @Field("id") String id
    );

    @FormUrlEncoded
    @POST("api_save_complaint.php")
    Call<SetterTicket> saveComplaint(
            @Field("login_id") String login_id,
            @Field("login_type") String login_type,
            @Field("complaintType") String complaintType,
            @Field("selectedCategoryValue") String selectedCategoryValue,
            @Field("selectedProductValue") String selectedProductValue,
            @Field("selectedMakeValue") String selectedMakeValue,
            @Field("selectedModelValue") String selectedModelValue,
            @Field("serial_no") String serial_no,
            @Field("ticketPriority") String ticketPriority,
            @Field("equip_cond") String equip_cond,
            @Field("remark") String remark
    );

    @FormUrlEncoded
    @POST("api_pms_call_count.php")
    Call<SetterTicket> getPMSCallCount(
            @Field("login_id") String login_id,
            @Field("login_type") String login_type,
            @Field("complaintType") String complaintType,
            @Field("selectedCategoryValue") String selectedCategoryValue,
            @Field("selectedProductValue") String selectedProductValue,
            @Field("selectedMakeValue") String selectedMakeValue,
            @Field("selectedModelValue") String selectedModelValue,
            @Field("serial_no") String serial_no
    );

    @FormUrlEncoded
    @POST("api_save_complaint_photo_upload.php")
    Call<SetterLogin> setComplaintPhotoUpload(
            @Field("id") String id,
             @Field("cust_signature") String cust_signature,
            @Field("rate_our_service") String rate_our_service,
            @Field("customer_remark") String customer_remark
    );

    @FormUrlEncoded
    @POST("api_complaint_status.php")
    Call<SetterLogin> setComplaintPhoto(
            @Field("id") String id,
            @Field("flag") String flag,
            @Field("photo") String str,
            @Field("login_id") String login_id,
            @Field("photo_flag") String photo_flag
    );

    @Multipart
    @POST("upload.php")
    Call<ResponseModel> fileUpload(
            @Part("sender_information") RequestBody description,
            @Part MultipartBody.Part file);

    @Multipart
    @POST("upload_customer_complaint.php")
    Call<ResponseModel> fileUploadCust(
            @Part("sender_information") RequestBody description,
            @Part MultipartBody.Part file);
}
