package com.adealink.weparty.module.order.viewmodel

import androidx.lifecycle.LiveData
import com.adealink.frame.base.Rlt
import com.adealink.frame.mvvm.livedata.ExtLiveData
import com.adealink.weparty.module.im.data.SessionSource
import com.adealink.weparty.module.order.data.CreateOrderRes
import com.adealink.weparty.module.order.data.ORDER_SOURCE_DEFAULT
import com.adealink.weparty.module.order.data.OrderDetailInfo

interface IOrderViewModel {

    suspend fun queryUnCompleteOrder(uid: String): List<OrderDetailInfo>


    val onOrderCreatedLD: ExtLiveData<CreateOrderRes>

    fun createOrder(
        playmateId: String,
        count: Int,
        remark: String?,
        source: Int = ORDER_SOURCE_DEFAULT
    ): LiveData<Rlt<CreateOrderRes>>

    fun refuse(order: OrderDetailInfo): LiveData<Rlt<Any>>

    fun accept(order: OrderDetailInfo): LiveData<Rlt<Any>>

    fun startService(orderId: OrderDetailInfo): LiveData<Rlt<Any>>

    fun completeService(order: OrderDetailInfo): LiveData<Rlt<Any>>

}