package com.sonic.frog.controller.web;

import com.sonic.common.auth.domains.Session;
import com.sonic.common.rpc.Result;
import com.sonic.frog.domain.input.*;
import com.sonic.frog.domain.output.ChatBubbleListOutput;
import com.sonic.frog.domain.output.ChatSetOutput;
import com.sonic.frog.service.ChatService;
import com.sonic.frog.service.ChatSetService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Web-聊天
 *
 * @author code
 */
@RestController
@Slf4j
public class ChatWeb {

    @Autowired
    private ChatService chatService;

    @ApiOperation(value = "发送开场白消息", tags = {"Web-聊天"})
    @PostMapping("/web/chat/send-dialogue-prologue-message")
    public Result<Void> sendDialoguePrologueMessage(@Validated @RequestBody SendDialoguePrologueMessageInput input, @ApiParam(hidden = true) Session session) {
        chatService.sendDialoguePrologueMessage(input.getAiId(),session.getUserId());
        return Result.success();
    }
}
