<html>
    <head>
        <%- include('./partials/head'); %>
    </head>
    <body>
        <%- include('./partials/navbar'); %>
        <div class="hero-body">
            <div class="box">
                <h1 class="title">
                    Encontre Bots
                </h1>
                Gerencie os bots na fila aqui!
            </div>
            <center>
                <table class="table">
                    <thead>
                      <tr>
                        <th><abbr title="Position">Nome</abbr></th>
                        <th><abbr title="Played">ID</abbr></th>
                        <th><abbr title="Won">Prefixo</abbr></th>
                        <th><abbr title="Test">Testar</abbr></th>
                        <th><abbr title="Drawn">Aprovar</abbr></th>
                        <th><abbr title="Lost">Reprovar</abbr></th>
                      </tr>
                    </thead>
                    <tfoot>
                        <% bots.forEach((bot) => { %>
                            <tr>
                                <th><abbr title="Nome"><%= bot.name %></abbr></th>
                                <th><abbr title="ID"><%= bot.bot %></abbr></th>
                                <th><abbr title="Prefixo"><%= bot.prefix %></abbr></th>
                                <th><abbr title="Testar"><a href="https://discordapp.com/oauth2/authorize?client_id=<%= bot.bot %>&guild_id=1119998748265828372&scope=bot%20applications.commands&permissions=0"><button class="button is-link">Testar</button></a></abbr></th>
                                <form action="/api/bots/<%= bot.bot %>/approve" method="post">
                                    <th><abbr title="Aprovar"><button type="submit" class="button is-success">Aprovar</button></abbr></th>
                                </form>
                                <form action="/api/bots/<%= bot.bot %>/deny" method="post">
                                    <th><abbr title="Reprovar"><button type="submit" class="button is-danger">Reprovar</button></abbr></th>
                                </form>
                              </tr>
                        <% }); %>
                    </tfoot>
                  </table>
            </center>
        </div>
        <%- include('./partials/footer'); %>
    </body>
</html>