<!-- Review Card -->
<div id="<%= review.author + review.botID %>" class="review_card">
    <% if(review.rate) { %><p style="float: right; color: rgb(10, 206, 10); margin: 0px;">Positive Review</p><% }else{ %><p style="float: right; color: red; margin: 0px;">Negative Review</p><% } %>
    <img src="<%= bot.users.cache.get(review.author) ? bot.users.cache.get(review.author).displayAvatarURL({dynamic: true}) : 'https://i.imgur.com/Z1jey6q.png' %>" alt="Review" style="border-radius: 100%; width: 50px;">
    <b><%= bot.users.cache.get(review.author) ? bot.users.cache.get(review.author).tag : 'None#0000' %></b>  
    <b><% for(i = 0; i < review.star_rate; i++){ %> <i style="color: gold;" class="fa fa-star"></i><% } %>
    <% for(i = 0; i < 5 - review.star_rate; i++){ %><i style="margin: 2px;" class="fa fa-star"></i><% } %></b>
    <hr style="margin: 15px;">
        <% if(review.flagged){ %><b style="margin: 15px;" class="link" id="<%= review.author %><%= review.botID %>flag_button" onclick="reveal('<%= review.author %>', '<%= review.botID %>', '<%= review.content %>')">Reveal</b><% } %>
        <b style="margin: 15px; display: none;" class="link" id="<%= review.author %><%= review.botID %>flag_button" onclick="reveal('<%= review.author %>', '<%= review.botID %>', '<%= review.content %>')">Reveal</b>
        <p style="margin: 15px;" id="<%= review.author %><%= review.botID %>content"><% if(review.flagged){ %><strong style="color: grey;">This review has been flagged by bot owner.</strong><% }else{ %><%= review.content %><% } %></p>
    <% if(review.edited) { %><p class="note">(edited)</p><% } %>
    <% if(user && review.likes.get(user.id)) { %>
        <a id="<%= review.author %><%= review.botID %>like" style="background-color: rgba(255, 255, 255, 0.096); padding: 7px;" onclick="add_like('<%= review.author %>', '<%= review.botID %>')" class="button"><%= review.likes.size %> ğŸ‘�</a>
    <% }else{ %>
        <a id="<%= review.author %><%= review.botID %>like" onclick="add_like('<%= review.author %>', '<%= review.botID %>')" class="button"><%= review.likes.size %> ğŸ‘�</a>
    <% } %>
    <% if(user && review.dislikes.get(user.id)) { %>
        <a id="<%= review.author %><%= review.botID %>dislike" style="background-color: rgba(255, 255, 255, 0.096); padding: 7px;"  onclick="remove_like('<%= review.author %>', '<%= review.botID %>')" class="button"><%= review.dislikes.size %> ğŸ‘�</a>
    <% }else{ %>
        <a id="<%= review.author %><%= review.botID %>dislike" onclick="remove_like('<%= review.author %>', '<%= review.botID %>')" class="button"><%= review.dislikes.size %> ğŸ‘�</a>
    <% } %>
    <% if(user && bot.config.root.includes(user.id)) { %><a id="delete" onclick="delete_review('<%= review.author %>', '<%= review.botID %>')" class="button"><i class="fa fa-trash"></i> Delete</a><% } %>
    <% if(user && user.id == review.author) { %><a id="<%= review.author %><%= review.botID %>edit" onclick="edit_review('<%= review.author %>', '<%= review.botID %>')" class="button">Edit</a><% } %>
    <% if(user && user.id == bots.main_owner) { %><a id="<%= review.author %><%= review.botID %>add_reply" onclick="reply('<%= review.author %>', '<%= review.botID %>')" class="button">Reply</a><% } %>
    <% if(user && user.id == bots.main_owner) { %><a id="<%= review.author %><%= review.botID %>flag" onclick="flag('<%= review.author %>', '<%= review.botID %>')" class="button"><% if(review.flagged) { %>UnFlag<% }else{ %>Flag<% } %></a><% } %>
    <p class="note" style="float: right;">Added <%= time(review.date) %> ago</p>
</div>
<!-- Edit Box -->
<div id="<%= review.author + review.botID %>edit_box" style="display: none;" class="review_card">
    <% if(review.rate) { %><p style="float: right; color: rgb(10, 206, 10); margin: 0px;">Positive Review</p><% }else{ %><p style="float: right; color: red; margin: 0px;">Negative Review</p><% } %>
    <img src="<%= bot.users.cache.get(review.author) ? bot.users.cache.get(review.author).displayAvatarURL({dynamic: true}) : 'https://i.imgur.com/Z1jey6q.png' %>" alt="Review" style="border-radius: 100%; width: 50px;">
    <b><%= bot.users.cache.get(review.author) ? bot.users.cache.get(review.author).tag : 'None#0000' %></b>  
    <b><% for(i = 0; i < review.star_rate; i++){ %> <i style="color: gold;" class="fa fa-star"></i><% } %>
    <% for(i = 0; i < 5 - review.star_rate; i++){ %><i style="margin: 2px;" class="fa fa-star"></i><% } %></b>
    <hr style="margin: 15px;">
    <form method="POST">
        <textarea style="width: 100%; height: 100px;" name="review_edits" placeholder="Sorry I misspelled awesome" required><%= review.content %></textarea>
        <button class="realbutton" name="edit_review" value="<%= review.author %>"><i class="fa fa-plus"></i> Confirm Edits</button>
    </form>
    <br>
    <% if(user && review.likes.get(user.id)) { %>
        <a id="<%= review.author %><%= review.botID %>like" style="background-color: rgba(255, 255, 255, 0.096); padding: 7px;" class="button"><%= review.likes.size %> ğŸ‘�</a>
    <% }else{ %>
        <a id="<%= review.author %><%= review.botID %>like" class="button"><%= review.likes.size %> ğŸ‘�</a>
    <% } %>
    <% if(user && review.dislikes.get(user.id)) { %>
        <a id="<%= review.author %><%= review.botID %>dislike" style="background-color: rgba(255, 255, 255, 0.096); padding: 7px;" class="button"><%= review.dislikes.size %> ğŸ‘�</a>
    <% }else{ %>
        <a id="<%= review.author %><%= review.botID %>dislike" class="button"><%= review.dislikes.size %> ğŸ‘�</a>
    <% } %>
    <p class="note" style="float: right;">Added <%= time(review.date) %> ago</p>
</div>
<!-- Reply Box -->
<div id="<%= review.author + review.botID %>add_replybox" style="display: none;" class="review_card">
    <p style="float: right;" class="note">Replying to <%= bot.users.cache.get(review.author) ? bot.users.cache.get(review.author).tag : 'None#0000' %></p>
    <img src="<%= fetch.displayAvatarURL() %>" alt="Review" style="border-radius: 100%; width: 50px;">
    <b><%= fetch.tag %></b>  
    <hr style="margin: 15px;">
    <form method="POST">
        <textarea style="width: 100%; height: 100px;" name="reply" placeholder="Thanks you for this awesome review!" required></textarea>
        <button class="realbutton" name="add_reply" value="<%= review.author %>"><i class="fa fa-plus"></i> Add Reply</button>
    </form>
    <p class="note">Replied 1 second ago</p>
</div>
<!-- Replies -->
<% if(review.replies.size <= 1){ %>
    <% for (let ins of review.replies.keys()){ %>
    <div id="<%= review.author + review.botID %>reply" style="margin-left: 50px;" class="review_card">
        <p style="float: right;" class="note">Replying to <%= bot.users.cache.get(review.author) ? bot.users.cache.get(review.author).tag : 'None#0000' %></p>
        <img src="<%= fetch.displayAvatarURL() %>" alt="Review" style="border-radius: 100%; width: 50px;">
        <b><%= fetch.tag %></b>  
        <% let added = review.replies.get(ins)%>
        <hr style="margin: 15px;">
        <p style="margin: 15px;"><%= ins %></p>
        <% if(user && user.id == bots.main_owner) { %><a id="delete" onclick="delete_reply('<%= review.author %>', '<%= review.botID %>', '<%= ins %>')" class="button"><i class="fa fa-trash"></i> Delete Reply</a><% } %>
        <p class="note">Replied <%= time(added) %> ago</p>
    </div>
    <% } %>
<% } %>
