<%- await include("partials/header", { bot, user, title: "Home", is_logged, dashboardDetails, dashboardConfig, hasClientSecret }) %>

<div class="container-sm center" style="margin-top: 25px;">
  <div class="d-grid gap-2 col-6 mx-auto">
    <h2><%= dashboardDetails.name %>'s commands</h2>
    <hr>

    <table class="table table-striped table-hover">
        <thead>
            <tr>
                <th scope="col">#</th>
                <th scope="col">Name</th>
                <th scope="col">Description</th>
                <th scope="col">Usage</th>
            </tr>
        </thead>
        <tbody>
            <% commands.forEach((command, rank) => { %>
                <tr>
                    <th scope="row"><%= rank + 1 %></th>
                    <td><%= command.name %></td>
                    <td><%= command.description %></td>
                    <td><%= command.usage %></td>
                </tr>
            <% }) %>
        </tbody>
      </table>
    
    <% if(dashboardDetails.serverUrl) { %>
        <p>Need more help ?</p>
        <a class="btn btn-warning" href="<%= dashboardDetails.serverUrl %>">Discord Server</a>
    <% } %>

  </div>
</div>
<%- await include("partials/footer") %>