package com.sortug.thaiinput
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.http.GET
import retrofit2.http.Query
import retrofit2.http.Headers
import okhttp3.ResponseBody
import retrofit2.Response

interface GoogleInputToolsApiService {
    @GET("request")
    @Headers("User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36")
    suspend fun getInputSuggestions(
        @Query("text") text: String,
        @Query("itc") itc: String = "th-t-i0-und",
        @Query("num") num: String = "13",
        @Query("cp") cp: String = "0",
        @Query("cs") cs: String = "1",
        @Query("ie") ie: String = "utf-8",
        @Query("oe") oe: String = "utf-8",
        @Query("app") app: String = "demopage"
    ): List<Any>
    @GET("request")
    suspend fun getRawInputSuggestions(
        @Query("text") text: String,
        @Query("itc") itc: String = "th-t-i0-und",
        @Query("num") num: String = "13",
        @Query("cp") cp: String = "0",
        @Query("cs") cs: String = "1",
        @Query("ie") ie: String = "utf-8",
        @Query("oe") oe: String = "utf-8",
        @Query("app") app: String = "demopage"
    ): Response<ResponseBody>
}
