package com.example.what_the_fantasy.data.services

import com.example.what_the_fantasy.data.model.Favorite
import com.example.what_the_fantasy.data.model.Comment
import com.example.what_the_fantasy.data.model.Quote
import com.example.what_the_fantasy.data.model.SrcLanguage
import com.example.what_the_fantasy.data.model.User
import com.example.what_the_fantasy.ui.states.AuthUserState
import kotlinx.coroutines.flow.StateFlow

interface IServices {

    fun validLogin(username : String,
                   passwd : String,
                   navController: (Int) -> Unit,
                   initialierCurrentUser : (Int) ->Unit): Boolean

    fun EditUsername(username : String, index : Int) : Boolean
    fun EditEmail(email : String, index : Int) : Boolean
    fun EditPasswd(passwd : String, index : Int)
    fun EditImage(imageURL : String, index : Int)
    fun ChangeLangage(index : Int): SrcLanguage

    fun AddFav(userId: Int, QuoteId : Int)
    fun SupFav(userId: Int, QuoteId : Int)
    fun AddComment(content : String)
    fun CreateUser(username : String, email : String, passwd : String) : Boolean
    fun getFavorite(user: User): List<Quote>
    fun getAllUsers(): List<User>
    fun getComment(quoteId : Int) : List<Comment>
    fun getUserById(id: Int): User?

    fun SearchQuote(quote : String)

    fun getQuote( id : Int): Quote?

    fun isFavorite(id : Int, user: User): Boolean
    fun getAllFavorite(): List<Favorite>
    fun getAllQuote(): List<Quote>
    fun getSomeQuotes(nb: Int, page: Int) : MutableList<Quote>

    fun search(type : String ,search:String ,indexCount: Int): List<Quote>
}