using Microsoft.AspNetCore.Mvc;
using SVSim.Database.Services.Guild;
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
using SVSim.EmulatedEntrypoint.Models.Dtos.GuildChat;
using SVSim.EmulatedEntrypoint.Models.Dtos.Requests;

namespace SVSim.EmulatedEntrypoint.Controllers;

/// <summary>/guild_chat/* — 7 endpoints. See docs/api-spec/endpoints/post-login/guild_chat-*.md.</summary>
[Route("guild_chat")]
public sealed class GuildChatController : SVSimController
{
    private readonly IGuildChatService _chat;

    public GuildChatController(IGuildChatService chat) => _chat = chat;

    [HttpPost("messages")]
    public Task<ActionResult<GuildChatMessagesResponse>> Messages([FromBody] GuildChatMessagesRequest req, CancellationToken ct)
        => Task.FromResult<ActionResult<GuildChatMessagesResponse>>(new GuildChatMessagesResponse
        {
            MaintenanceCardList = new(),
            Users = new(),
            ChatMessage = new(),
            WaitInterval = 10,
        });

    [HttpPost("post")]
    public Task<ActionResult<GuildChatPostResponse>> Post([FromBody] GuildChatPostRequest req, CancellationToken ct)
        => Task.FromResult<ActionResult<GuildChatPostResponse>>(new GuildChatPostResponse());

    [HttpPost("add_deck")]
    public Task<ActionResult<EmptyResponse>> AddDeck([FromBody] GuildChatAddDeckRequest req, CancellationToken ct)
        => Task.FromResult<ActionResult<EmptyResponse>>(new EmptyResponse());

    [HttpPost("delete_deck")]
    public Task<ActionResult<EmptyResponse>> DeleteDeck([FromBody] GuildChatDeleteDeckRequest req, CancellationToken ct)
        => Task.FromResult<ActionResult<EmptyResponse>>(new EmptyResponse());

    [HttpPost("add_replay")]
    public Task<ActionResult<EmptyResponse>> AddReplay([FromBody] GuildChatAddReplayRequest req, CancellationToken ct)
        => Task.FromResult<ActionResult<EmptyResponse>>(new EmptyResponse());

    [HttpPost("replay_detail")]
    public Task<ActionResult<GuildChatReplayDetailResponse>> ReplayDetail([FromBody] GuildChatReplayDetailRequest req, CancellationToken ct)
        => Task.FromResult<ActionResult<GuildChatReplayDetailResponse>>(new GuildChatReplayDetailResponse());

    [HttpPost("deck_log")]
    public Task<ActionResult<GuildChatDeckLogResponse>> DeckLog([FromBody] GuildChatDeckLogRequest req, CancellationToken ct)
        => Task.FromResult<ActionResult<GuildChatDeckLogResponse>>(new GuildChatDeckLogResponse());
}
