package com.adealink.weparty.room.sdk.controller

import com.adealink.frame.base.Rlt
import com.adealink.weparty.module.room.chat.data.Message
import com.adealink.weparty.module.room.chat.data.Notification
import com.adealink.weparty.room.sdk.listener.IMessageListener
import io.trtc.tuikit.atomicxcore.api.barrage.Barrage
import kotlinx.coroutines.flow.StateFlow

interface IMessageController<L : IMessageListener> : IController<L> {

    val messagesFlow: StateFlow<List<Message>>

    val newMessagesFlow: StateFlow<List<Message>>

    val notificationsFlow: StateFlow<List<Notification>>

    suspend fun sendTextMessage(text: String): Rlt<Any>

    suspend fun sendLocalMessage(barrage:Barrage): Rlt<Any>

}