<div class="column <% if (queue) { %>is-half<% } else { %>is-one-third<% } %>" is-bot-card>
    <div class="box has-background-primary" style="overflow: hidden; height: 100%;">
        <article class="media">
            <div class="media-left">
                <figure class="image is-64x64">
                    <img width="64" height="64" class="is-rounded" loading="lazy" src="<%= bot.icon?.url || bot.avatar?.url || `${baseURL}/img/defaultavatar` %>.webp?size=128" alt="<%= __("common.img.avatar", bot.name) %>" onerror="this.onerror = null;this.src = '/img/defaultavatar.webp';console.log('<%= __("common.img.loadFail", bot._id) %>');" >
                </figure>
            </div>
            <div style="overflow: hidden;" class="media-content">
                <div class="content">
                    <p>
                    <span class="is-size-4 title has-text-default is-mobile">
                        <span><%= bot.name %></span>
                        <% if (bot.status.premium) { %>
                            <span style="vertical-align: middle;" title="<%= __("common.rank.premium.bot") %>" class="icon iconalign">
                                <i aria-hidden="true" class="fas fa-star has-text-warning fa-1x"></i>
                            </span>
                        <% } %>
                        <% if (bot.status.siteBot) { %>
                            <span style="vertical-align: middle;" title="<%= __("common.rank.siteBot") %>" class="icon iconalign">
                                <i aria-hidden="true" class="fad fa-cogs has-text-grey-lighter fa-1x"></i>
                            </span>
                        <% } %>
                        <% if (!bot.status.approved && !bot.status.archived) { %>
                            <span style="vertical-align: middle;" title="<%= __("common.rank.unapproved") %>" class="icon iconalign">
                                <i aria-hidden="true" class="fad fa-exclamation-triangle has-text-danger fa-1x"></i>
                            </span>
                        <% } %>
                        <% if (bot.status.archived) { %>
                            <span style="vertical-align: middle;" title="<%= __("common.rank.archived") %>" class="icon iconalign">
                                <i aria-hidden="true" class="fad fa-archive has-text-warning fa-1x"></i>
                            </span>
                        <% } %>
                        <% if (bot.status.hidden) { %>
                            <span style="vertical-align: middle;" title="<%= __("common.rank.hidden") %>" class="icon iconalign">
                                <i aria-hidden="true" class="fad fa-eye-slash has-text-white fa-1x"></i>
                            </span>
                        <% } %>
                    </span>
                        <br />
                        <%= bot.shortDesc.length >= 64 ? bot.shortDesc.slice(0, 64)+'\u2026' : bot.shortDesc %>
                    </p>
                </div>
                <div class="content-footer">
                    <div class="buttons">
                    <% if (bot.status.archived === true) { %>
                        <a href="<%= linkPrefix %>/bots/<%= bot.vanityUrl ? bot.vanityUrl : (bot._id || bot.id) %>" class="button is-default is-outlined">
                            <span class="icon">
                              <i class="fas fa-eye"></i>
                            </span>
                            <span><%= __("common.view") %></span>
                        </a>
                        <a href="<%= linkPrefix %>/bots/<%= bot._id || bot.id %>/resubmit" class="button is-default is-outlined">
                            <span class="icon">
                              <i class="fas fa-redo-alt"></i>
                            </span>
                            <span><%= __("common.resubmit") %></span>
                        </a>
                    <% } else if (verificationApp === true) { %>
                        <a href="<%= linkPrefix %>/staff/apps/verification/<%= bot._id || bot.id %>" class="button is-default is-outlined">
                            <span class="icon">
                              <i class="fas fa-eye"></i>
                            </span>
                            <span><%= __("common.application.view") %></span>
                        </a>
                    <% } else if (search === true) { %>
                        <a href="<%= linkPrefix %>/bots/<%= bot.vanityUrl ? bot.vanityUrl : (bot._id || bot.id) %>" class="button is-default is-outlined">
                            <span class="icon">
                                <i class="fas fa-robot"></i>
                            </span>
                            <span><%= __("common.view.bot") %></span>
                        </a>
                    <% } else if (queue === true) { %>
                        <a href="<%= linkPrefix %>/bots/<%= bot.vanityUrl ? bot.vanityUrl : (bot._id || bot.id) %>" class="button is-default is-outlined">
                            <span class="icon">
                                <i class="fas fa-eye"></i>
                            </span>
                            <span><%= __("common.view") %></span>
                        </a>
                        <a href="https://discord.com/api/oauth2/authorize?client_id=<%= bot._id || bot.id %>&scope=<%= parseScopes(bot.scopes) %>&guild_id=<%= staffServer %>" target="_blank" rel="noopener" class="button is-orange is-outlined">
                            <span class="icon">
                                <i class="fas fa-vial"></i>
                            </span>
                            <span><%= __("page.bots.invite.staff") %></span>
                        </a>
                        <% if (req.user.db.rank.assistant && (!bot.scopes || bot.scopes.bot)) { %>
                            <a href="https://discord.com/api/oauth2/authorize?client_id=<%= bot._id || bot.id %>&scope=bot&guild_id=<%= mainServer %>" target="_blank" rel="noopener" class="button is-link is-outlined">
                                <span class="icon">
                                    <i class="fas fa-shield-alt"></i>
                                </span>
                                <span><%= __("page.bots.invite.main") %></span>
                            </a>
                        <% } %>
                        <a href="<%= linkPrefix %>/bots/<%= bot._id || bot.id %>/approve" class="button is-success is-outlined">
                            <span class="icon">
                                <i class="fas fa-check"></i>
                            </span>
                            <span><%= __("common.staff.approve") %></span>
                        </a>
                        <a href="<%= linkPrefix %>/bots/<%= bot._id || bot.id %>/decline" class="button is-danger is-outlined">
                            <span class="icon">
                                <i class="fas fa-times"></i>
                            </span>
                            <span><%= __("common.staff.decline") %></span>
                        </a>
                    <% } else if (inviteQueue === true) { %>
                        <a href="<%= linkPrefix %>/bots/<%= bot.vanityUrl ? bot.vanityUrl : (bot._id || bot.id) %>" class="button is-default is-outlined">
                            <span class="icon">
                                <i class="fas fa-eye"></i>
                            </span>
                            <span><%= __("common.view") %></span>
                        </a>
                        <a href="https://discord.com/api/oauth2/authorize?client_id=<%= bot._id || bot.id %>&scope=bot&guild_id=<%= mainServer %>" target="_blank" rel="noopener" class="button is-link is-outlined">
                            <span class="icon">
                                <i class="fas fa-shield-alt"></i>
                            </span>
                            <span><%= __("page.bots.invite.main") %></span>
                        </a>
                    <% } else { %>
                        <a href="<%= linkPrefix %>/bots/<%= bot.vanityUrl ? bot.vanityUrl : (bot._id || bot.id) %>" class="button is-default is-outlined">
                            <span class="icon">
                              <i class="fas fa-eye"></i>
                            </span>
                            <span><%= __("common.view") %></span>
                        </a>
                        <% if (req.user && profile === true && (bot.owner.id === req.user.id || bot.editors.includes(req.user.id))) { %>
                            <a href="<%= linkPrefix %>/bots/<%= bot._id || bot.id %>/edit" class="button is-warning is-outlined">
                                <span class="icon">
                                  <i class="fas fa-pencil"></i>
                                </span>
                                <span><%= __("common.edit") %></span>
                            </a>
                        <% } %>
                        <a href="<%= bot.links.invite %>" class="button is-blurple is-outlined">
                            <span class="icon">
                              <i class="fas fa-plus"></i>
                            </span>
                            <span><%= __("common.invite") %></span>
                        </a>
                    <% } %>
                    </div>
                </div>
            </div>
        </article>
    </div>
</div>
