export default (configuration) => {
    return `
    fun getAllUser( ): LiveData<Resource<FriendListResponse>> =
        liveData(Dispatchers.IO) {
            emit(Resource.loading(null))
            val response = remoteDataSource.getAllUser()
            emit(response)
        }

        fun sendMessageToBot( request: String): LiveData<Resource<ChatBotTextResponse>> =
        liveData(Dispatchers.IO) {
            emit(Resource.loading(null))
            val response = remoteDataSource.sendMessageToBot(request)
            emit(response)
        }

    fun sendMessageToBot( request: ChatBotRequest): LiveData<Resource<ChatBotTextResponse>> =
        liveData(Dispatchers.IO) {
            emit(Resource.loading(null))
            val response = remoteDataSource.sendMessageToBot(request)
            emit(response)
        }

    fun sendTextMessage( request: ChatTextRequest): LiveData<Resource<ChatTextResponse>> =
    liveData(Dispatchers.IO) {
        emit(Resource.loading(null))
        val response = remoteDataSource.sendTextMessage(request)
        emit(response)
    }

    fun createRoomRequests( request: CreateRoomRequests): LiveData<Resource<CreateRoomResponse>> =
        liveData(Dispatchers.IO) {
            emit(Resource.loading(null))
            val response = remoteDataSource.createRoomRequests(request)
            emit(response)
        }


fun getChats( request: ChatRequest): LiveData<Resource<ChatResponse>> =
    liveData(Dispatchers.IO) {
        emit(Resource.loading(null))
        val response = remoteDataSource.getChats(request)
        emit(response)
    }


fun getStartPool( user_id: Int): LiveData<Resource<SingleChatMessageResponse>> =
    liveData(Dispatchers.IO) {
        emit(Resource.loading(null))
        val response = remoteDataSource.getStartPool(user_id)
        emit(response)
    }

fun getAllRoom( user_id: Int): LiveData<Resource<ChatRoomResponse>> =
    liveData(Dispatchers.IO) {
        emit(Resource.loading(null))
        val response = remoteDataSource.getAllRoom(user_id)
        emit(response)
    }

      `;
  };